This commit is contained in:
2024-05-08 17:59:20 +08:00
parent 632f2a4ce2
commit 7b9fdcdc88
2 changed files with 93 additions and 348 deletions

View File

@ -1,111 +1,51 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="资讯标题" prop="infoTitle"> <el-form-item label="资讯标题" prop="infoTitle">
<el-input <el-input v-model="queryParams.infoTitle" placeholder="请输入资讯标题" maxlength="100" clearable
v-model="queryParams.infoTitle" @keyup.enter.native="handleQuery" />
placeholder="请输入资讯标题"
maxlength="100"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="资讯分类" prop="infoCategoryId"> <el-form-item label="资讯分类" prop="infoCategoryId">
<el-button <el-button type="" v-if="infoCategoryName == '请选择资讯分类'" @click="clickitem()" style="
type=""
v-if="infoCategoryName == '请选择资讯分类'"
@click="clickitem()"
style="
width: 250px; width: 250px;
text-align: left; text-align: left;
height: 36px; height: 36px;
color: #c0c4cc; color: #c0c4cc;
overflow: hidden; overflow: hidden;
" ">{{ infoCategoryName }}</el-button>
>{{ infoCategoryName }}</el-button <el-button @click="clickitem()" type="" v-else style="
>
<el-button
@click="clickitem()"
type=""
v-else
style="
width: 250px; width: 250px;
text-align: left; text-align: left;
height: 36px; height: 36px;
padding-left: -10px; padding-left: -10px;
overflow: hidden; overflow: hidden;
" ">{{ infoCategoryName }}</el-button>
>{{ infoCategoryName }}</el-button
>
</el-form-item> </el-form-item>
<!-- </el-form-item> --> <!-- </el-form-item> -->
<el-form-item label="资讯编码" prop="infoCode"> <el-form-item label="资讯编码" prop="infoCode">
<el-input <el-input v-model="queryParams.infoCode" placeholder="请输入资讯编码" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.infoCode"
placeholder="请输入资讯编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
type="primary" v-hasPermi="['manage:info:add']">新增</el-button>
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['manage:info:add']"
>新增</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
type="success" v-hasPermi="['manage:info:edit']">修改</el-button>
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['manage:info:edit']"
>修改</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
type="danger" v-hasPermi="['manage:info:remove']">删除</el-button>
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['manage:info:remove']"
>删除</el-button
>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
@ -117,17 +57,10 @@
v-hasPermi="['manage:info:export']" v-hasPermi="['manage:info:export']"
>导出</el-button> >导出</el-button>
</el-col> --> </el-col> -->
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
v-loading="loading"
:data="infoList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键id" align="center" prop="id" /> --> <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
<el-table-column label="资讯标题" align="center" prop="infoTitle" /> <el-table-column label="资讯标题" align="center" prop="infoTitle" />
@ -136,113 +69,53 @@
<el-table-column label="资讯排序" align="center" prop="infoSort" /> <el-table-column label="资讯排序" align="center" prop="infoSort" />
<el-table-column <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
size="mini" v-hasPermi="['manage:info:edit']">修改</el-button>
type="text" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
icon="el-icon-edit" v-hasPermi="['manage:info:remove']">删除</el-button>
@click="handleUpdate(scope.row)"
v-hasPermi="['manage:info:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['manage:info:remove']"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
v-show="total > 0" @pagination="getList" />
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改资讯信息对话框 --> <!-- 添加或修改资讯信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form <el-form ref="form" :model="form" :rules="rules" label-width="140px" :inline="true">
ref="form"
:model="form"
:rules="rules"
label-width="140px"
:inline="true"
>
<el-form-item label="资讯标题" prop="infoTitle"> <el-form-item label="资讯标题" prop="infoTitle">
<el-input <el-input v-model="form.infoTitle" maxlength="100" placeholder="请输入资讯标题" />
v-model="form.infoTitle"
maxlength="100"
placeholder="请输入资讯标题"
/>
</el-form-item> </el-form-item>
<el-form-item label="资讯分类" prop="infoCategoryId"> <el-form-item label="资讯分类" prop="infoCategoryId">
<el-button <el-button type="" v-if="form.infoCategoryName == '请选择资讯分类'" @click="clickinnerVisible()" style="
type=""
v-if="form.infoCategoryName == '请选择资讯分类'"
@click="clickinnerVisible()"
style="
width: 250px; width: 250px;
text-align: left; text-align: left;
height: 36px; height: 36px;
color: #c0c4cc; color: #c0c4cc;
overflow: hidden; overflow: hidden;
" ">{{ form.infoCategoryName }}</el-button>
>{{ form.infoCategoryName }}</el-button <el-button @click="clickinnerVisible()" type="" v-else style="
>
<el-button
@click="clickinnerVisible()"
type=""
v-else
style="
width: 250px; width: 250px;
text-align: left; text-align: left;
height: 36px; height: 36px;
padding-left: -10px; padding-left: -10px;
overflow: hidden; overflow: hidden;
" ">{{ form.infoCategoryName }}</el-button>
>{{ form.infoCategoryName }}</el-button
>
</el-form-item> </el-form-item>
<el-form-item label="资讯图标" prop="infoLargePictureUrl"> <el-form-item label="资讯图标" prop="infoLargePictureUrl">
<stationAcatar <stationAcatar style="width: 208px" @imgUrl="imgUrl" :img="form.infoLargePictureUrl"
style="width: 208px" :type="'infoMainThumbnailUrl'" />
@imgUrl="imgUrl"
:img="form.infoLargePictureUrl"
:type="'infoMainThumbnailUrl'"
/>
<!-- <el-input v-model="form.leadThumbnailUrl" placeholder="请输入资讯主缩略图地址" /> --> <!-- <el-input v-model="form.leadThumbnailUrl" placeholder="请输入资讯主缩略图地址" /> -->
</el-form-item> </el-form-item>
<el-form-item label="显示顺序" prop="infoSort"> <el-form-item label="显示顺序" prop="infoSort">
<el-input <el-input v-model="form.infoSort" placeholder="请输入显示顺序" style="width: 250px" type="number"
v-model="form.infoSort" oninput="value=value.replace(/[^\d]/g,'')" maxLength="5" />
placeholder="请输入显示顺序"
style="width: 250px"
oninput="value=value.replace(/[^\d]/g,'')"
maxLength="5"
/>
</el-form-item> </el-form-item>
<el-form-item label="资讯图文内容" prop="infoContent"> <el-form-item label="资讯图文内容" prop="infoContent">
<editor <editor @imgs="imgs" maxlength="300" :min-height="102" placeholder="请输入资讯图文内容"
@imgs="imgs" style="width: 80%; margin-left: 18%; margin-top: -5%" v-model="form.infoContent" />
maxlength="300"
:min-height="102"
placeholder="请输入资讯图文内容"
style="width: 80%; margin-left: 18%; margin-top: -5%"
v-model="form.infoContent"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -251,92 +124,32 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 选择资讯 --> <!-- 选择资讯 -->
<el-dialog <el-dialog title="选择资讯" :visible.sync="innerVisible" width="1000px" append-to-body
title="选择资讯" :before-close="innerVisiblecancel">
:visible.sync="innerVisible" <el-form ref="queryForm" :model="informationqueryParams" label-width="80px" :inline="true">
width="1000px" <el-form-item label="资讯分类编码" prop="infoCategoryCode" label-width="120">
append-to-body <el-input v-model="informationqueryParams.infoCategoryCode" placeholder="请输入资讯分类编码" clearable />
:before-close="innerVisiblecancel"
>
<el-form
ref="queryForm"
:model="informationqueryParams"
label-width="80px"
:inline="true"
>
<el-form-item
label="资讯分类编码"
prop="infoCategoryCode"
label-width="120"
>
<el-input
v-model="informationqueryParams.infoCategoryCode"
placeholder="请输入资讯分类编码"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="资讯分类名称" label-width="120">
label="资讯分类名称" <el-input v-model="informationqueryParams.infoCategoryName" placeholder="请输入资讯分类名称" clearable />
label-width="120"
>
<el-input
v-model="informationqueryParams.infoCategoryName"
placeholder="请输入资讯分类名称"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="informationInfoinfo">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="addresetQuerylist">重置</el-button>
icon="el-icon-search"
size="mini"
@click="informationInfoinfo"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table :data="infolist" @cell-dblclick="nurseclick" v-loading="loading">
:data="infolist"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="primary" style="width: 15px; height: 15px" v-if="form.infoCategoryId == scope.row.id"
type="primary" circle @click="nurseclick(scope.row)"></el-button>
style="width: 15px; height: 15px" <el-button v-else style="width: 15px; height: 15px" circle @click="nurseclick(scope.row)"></el-button>
v-if="form.infoCategoryId == scope.row.id"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="infoCategoryCode" label="资讯分类编码" align="center">
property="infoCategoryCode"
label="资讯分类编码"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="infoCategoryName" label="资讯名称" align="center" :show-overflow-tooltip="true">
property="infoCategoryName"
label="资讯名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
<!-- <el-table-column <!-- <el-table-column
@ -360,109 +173,40 @@
> >
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<pagination <pagination v-show="total2 > 0" :total="total2" :page.sync="informationqueryParams.pageNum"
v-show="total2 > 0" :limit.sync="informationqueryParams.pageSize" @pagination="informationInfoinfo" />
:total="total2"
:page.sync="informationqueryParams.pageNum"
:limit.sync="informationqueryParams.pageSize"
@pagination="informationInfoinfo"
/>
</el-dialog> </el-dialog>
<!-- 搜索选择资讯 --> <!-- 搜索选择资讯 -->
<el-dialog <el-dialog title="选择资讯" :visible.sync="innerVisiblezx" width="1000px" append-to-body
title="选择资讯" :before-close="innerVisiblecancelzx">
:visible.sync="innerVisiblezx" <el-form ref="queryForm" :model="informationqueryParams" label-width="80px" :inline="true">
width="1000px" <el-form-item label="资讯分类编码" prop="infoCategoryCode" label-width="120">
append-to-body <el-input v-model="informationqueryParams.infoCategoryCode" placeholder="请输入资讯分类编码" clearable />
:before-close="innerVisiblecancelzx"
>
<el-form
ref="queryForm"
:model="informationqueryParams"
label-width="80px"
:inline="true"
>
<el-form-item
label="资讯分类编码"
prop="infoCategoryCode"
label-width="120"
>
<el-input
v-model="informationqueryParams.infoCategoryCode"
placeholder="请输入资讯分类编码"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="资讯分类名称" label-width="120">
label="资讯分类名称" <el-input v-model="informationqueryParams.infoCategoryName" placeholder="请输入资讯分类名称" clearable />
label-width="120"
>
<el-input
v-model="informationqueryParams.infoCategoryName"
placeholder="请输入资讯分类名称"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="informationInfoinfo">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="addresetQuerylist">重置</el-button>
icon="el-icon-search"
size="mini"
@click="informationInfoinfo"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table :data="infolist" @cell-dblclick="nurseclickzx" v-loading="loading">
:data="infolist"
@cell-dblclick="nurseclickzx"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="primary" style="width: 15px; height: 15px"
type="primary" v-if="queryParams.infoCategoryId == scope.row.id" circle @click="nurseclickzx(scope.row)"></el-button>
style="width: 15px; height: 15px" <el-button v-else style="width: 15px; height: 15px" circle @click="nurseclickzx(scope.row)"></el-button>
v-if="queryParams.infoCategoryId == scope.row.id"
circle
@click="nurseclickzx(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclickzx(scope.row)"
></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="infoCategoryCode" label="资讯分类编码" align="center">
property="infoCategoryCode"
label="资讯分类编码"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="infoCategoryName" label="资讯名称" align="center" :show-overflow-tooltip="true">
property="infoCategoryName"
label="资讯名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination v-show="total2 > 0" :total="total2" :page.sync="informationqueryParams.pageNum"
v-show="total2 > 0" :limit.sync="informationqueryParams.pageSize" @pagination="informationInfoinfo" />
:total="total2"
:page.sync="informationqueryParams.pageNum"
:limit.sync="informationqueryParams.pageSize"
@pagination="informationInfoinfo"
/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -486,8 +230,8 @@ export default {
innerVisible: false, innerVisible: false,
innerVisiblezx: false, innerVisiblezx: false,
imgs:'', imgs: '',
infoCategoryName:'请选择资讯分类', infoCategoryName: '请选择资讯分类',
informationqueryParams: { informationqueryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
@ -519,7 +263,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
infoCategoryName:"", infoCategoryName: "",
infoCategoryId: null, infoCategoryId: null,
infoTitle: null, infoTitle: null,
@ -592,7 +336,7 @@ export default {
this.innerVisible = true; this.innerVisible = true;
}, },
imgUrl(imgUrl) { imgUrl(imgUrl) {
console.log(imgUrl,'imgUrl') console.log(imgUrl, 'imgUrl')
this.form.infoLargePictureUrl = imgUrl; this.form.infoLargePictureUrl = imgUrl;
}, },
// imgs(item) { // imgs(item) {
@ -687,17 +431,17 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum= 1 this.queryParams.pageNum = 1
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams= { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
infoCategoryName:null, infoCategoryName: null,
infoCategoryId:null, infoCategoryId: null,
infoCategoryId: null, infoCategoryId: null,
infoTitle: null, infoTitle: null,
@ -714,7 +458,7 @@ export default {
infoReviser: null, infoReviser: null,
infoModifyTime: null infoModifyTime: null
} }
this.infoCategoryName="请选择资讯分类" this.infoCategoryName = "请选择资讯分类"
this.getList(); this.getList();
@ -731,7 +475,7 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加资讯信息"; this.title = "添加资讯信息";
this.form.infoCategoryName= "请选择资讯分类"; this.form.infoCategoryName = "请选择资讯分类";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -746,8 +490,9 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
console.log(this.form,'this.form') if (this.form.infoSort) {
// return this.form.infoSort = Number(this.form.infoSort)
}
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {

View File

@ -360,7 +360,7 @@
<el-button <el-button
type="primary" type="primary"
style="width: 15px; height: 15px" style="width: 15px; height: 15px"
v-if="form.departmentId == scope.row.departmentCode" v-if="form.departmentId == scope.row.id"
circle circle
@click="nurseclick(scope.row)" @click="nurseclick(scope.row)"
></el-button> ></el-button>
@ -720,7 +720,7 @@ export default {
}, },
// //
nurseclick(row) { nurseclick(row) {
this.form.departmentId = row.departmentCode; this.form.departmentId = row.id;
this.departmentName = row.departmentName; this.departmentName = row.departmentName;
this.form.diseaseTypeId = ''; this.form.diseaseTypeId = '';
this.diseaseTypeName = '请选择病种'; this.diseaseTypeName = '请选择病种';