资讯信息管理+资讯分类管理
This commit is contained in:
parent
215f3a9c67
commit
6b38a3154e
52
src/api/system/informationInfo.js
Normal file
52
src/api/system/informationInfo.js
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询资讯信息管理列表
|
||||||
|
export function listInformationInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/informationInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询资讯信息管理详细
|
||||||
|
export function getInformationInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/informationInfo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增资讯信息管理
|
||||||
|
export function addInformationInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/informationInfo/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改资讯信息管理
|
||||||
|
export function updateInformationInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/informationInfo/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询资讯分类列表
|
||||||
|
export function listInformationCategory(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/InformationCategory/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除资讯信息管理
|
||||||
|
export function delInformationInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/informationInfo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -1,6 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
<el-form-item label="资讯分类编码" prop="informationCategoryCode">
|
<el-form-item label="资讯分类编码" prop="informationCategoryCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.informationCategoryCode"
|
v-model="queryParams.informationCategoryCode"
|
||||||
@ -26,8 +33,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
type="primary"
|
||||||
|
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>
|
||||||
|
|
||||||
@ -40,7 +55,8 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:InformationCategory:add']"
|
v-hasPermi="['system:InformationCategory:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -51,7 +67,8 @@
|
|||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['system:InformationCategory:edit']"
|
v-hasPermi="['system:InformationCategory:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -62,7 +79,8 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['system:InformationCategory:remove']"
|
v-hasPermi="['system:InformationCategory:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -74,24 +92,48 @@
|
|||||||
v-hasPermi="['system:InformationCategory:export']"
|
v-hasPermi="['system:InformationCategory:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="InformationCategoryList" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="InformationCategoryList"
|
||||||
|
@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="informationCategoryCode" />
|
<el-table-column
|
||||||
<el-table-column label="资讯分类名称" align="center" prop="informationCategoryName" />
|
label="资讯分类编码"
|
||||||
<el-table-column label="资讯分类类型" align="center" prop="informationCategoryType"
|
align="center"
|
||||||
|
prop="informationCategoryCode"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="资讯分类名称"
|
||||||
|
align="center"
|
||||||
|
prop="informationCategoryName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="资讯分类类型"
|
||||||
|
align="center"
|
||||||
|
prop="informationCategoryType"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.informationCategoryType == "HEALTH_NOUS" ? "健康咨询" : "" }}
|
{{
|
||||||
{{ scope.row.informationCategoryType == "OTHER" ? "其他" : "" }}
|
scope.row.informationCategoryType == "HEALTH_NOUS" ? "健康咨询" : ""
|
||||||
</template>
|
}}
|
||||||
|
{{ scope.row.informationCategoryType == "OTHER" ? "其他" : "" }}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="资讯分类排序" align="center" prop="sort" />
|
<el-table-column label="资讯分类排序" align="center" prop="sort" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -99,20 +141,22 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:InformationCategory:edit']"
|
v-hasPermi="['system:InformationCategory:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:InformationCategory:remove']"
|
v-hasPermi="['system:InformationCategory:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@ -120,37 +164,65 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加资讯分类对话框 -->
|
<!-- 添加资讯分类对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="addopen" width="1100px" append-to-body>
|
<el-dialog
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
|
:title="title"
|
||||||
|
:visible.sync="addopen"
|
||||||
|
width="1100px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="110px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in form.informationCategoryList"
|
v-for="(item, index) in form.informationCategoryList"
|
||||||
:key="index"
|
:key="index"
|
||||||
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
||||||
>
|
>
|
||||||
|
<el-form-item
|
||||||
<el-form-item label="资讯分类名称"
|
label="资讯分类名称"
|
||||||
:rules="rules.informationCategoryList.informationCategoryName"
|
:rules="rules.informationCategoryList.informationCategoryName"
|
||||||
:prop="`informationCategoryList.${index}.informationCategoryName`"
|
:prop="`informationCategoryList.${index}.informationCategoryName`"
|
||||||
>
|
>
|
||||||
<el-input style="width:200px" v-model="item.informationCategoryName" placeholder="请输入资讯分类名称" />
|
<el-input
|
||||||
</el-form-item>
|
style="width: 200px"
|
||||||
<el-form-item label="资讯分类排序"
|
v-model="item.informationCategoryName"
|
||||||
:rules="rules.informationCategoryList.sort"
|
placeholder="请输入资讯分类名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类排序"
|
||||||
|
:rules="rules.informationCategoryList.sort"
|
||||||
:prop="`informationCategoryList.${index}.sort`"
|
:prop="`informationCategoryList.${index}.sort`"
|
||||||
>
|
>
|
||||||
<el-input v-model="item.sort" style="width:200px" placeholder="请输入资讯分类排序" />
|
<el-input
|
||||||
</el-form-item>
|
v-model="item.sort"
|
||||||
<el-form-item label="资讯分类类型"
|
style="width: 200px"
|
||||||
:rules="rules.informationCategoryList.informationCategoryType"
|
placeholder="请输入资讯分类排序"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类类型"
|
||||||
|
:rules="rules.informationCategoryList.informationCategoryType"
|
||||||
:prop="`informationCategoryList.${index}.informationCategoryType`"
|
:prop="`informationCategoryList.${index}.informationCategoryType`"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="item.informationCategoryType"
|
||||||
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
|
<el-option
|
||||||
<!-- <el-input style="width:200px" placeholder="请输入资讯分类排序" /> -->
|
v-for="item in options"
|
||||||
<el-radio v-model="item.informationCategoryType" label="HEALTH_NOUS">健康咨询</el-radio>
|
:key="item.value"
|
||||||
<el-radio v-model="item.informationCategoryType" label="OTHER">其他</el-radio>
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
</el-form-item>
|
>
|
||||||
<el-button
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
circle
|
circle
|
||||||
plain
|
plain
|
||||||
@ -166,7 +238,7 @@
|
|||||||
@click="deldisease(index)"
|
@click="deldisease(index)"
|
||||||
v-if="index != 0"
|
v-if="index != 0"
|
||||||
>
|
>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -174,8 +246,8 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
<el-form-item label="资讯分类名称" prop="informationCategoryName">
|
<el-form-item label="资讯分类名称" prop="informationCategoryName">
|
||||||
<el-input
|
<el-input
|
||||||
@ -185,7 +257,7 @@
|
|||||||
maxlength="15"
|
maxlength="15"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="资讯分类排序" prop="sort">
|
<el-form-item label="资讯分类排序" prop="sort">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.sort"
|
v-model="form.sort"
|
||||||
@ -194,10 +266,25 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="资讯分类类型" prop="informationCategoryType">
|
<el-form-item label="资讯分类类型" prop="informationCategoryType">
|
||||||
|
<el-select
|
||||||
<el-radio v-model="form.informationCategoryType" label="HEALTH_NOUS">健康咨询</el-radio>
|
v-model="form.informationCategoryType"
|
||||||
<el-radio v-model="form.informationCategoryType" label="OTHER">其他</el-radio>
|
placeholder="请选择"
|
||||||
</el-form-item>
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-radio v-model="form.informationCategoryType" label="HEALTH_NOUS"
|
||||||
|
>健康咨询</el-radio
|
||||||
|
>
|
||||||
|
<el-radio v-model="form.informationCategoryType" label="OTHER"
|
||||||
|
>其他</el-radio
|
||||||
|
> -->
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@ -208,12 +295,26 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listInformationCategory, getInformationCategory, delInformationCategory, addInformationCategory, updateInformationCategory } from "@/api/system/InformationCategory";
|
import {
|
||||||
|
listInformationCategory,
|
||||||
|
getInformationCategory,
|
||||||
|
delInformationCategory,
|
||||||
|
addInformationCategory,
|
||||||
|
updateInformationCategory,
|
||||||
|
} from "@/api/system/InformationCategory";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "InformationCategory",
|
name: "InformationCategory",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
options: [{
|
||||||
|
value: 'HEALTH_NOUS',
|
||||||
|
label: '健康咨询'
|
||||||
|
}, {
|
||||||
|
value: 'OTHER',
|
||||||
|
label: '其他'
|
||||||
|
}],
|
||||||
|
value:"",
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -232,7 +333,7 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
addopen:false,
|
addopen: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -269,47 +370,45 @@ export default {
|
|||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
informationCategoryName: [
|
informationCategoryName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择资讯分类名称",
|
message: "请选择资讯分类名称",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
informationCategoryType: [
|
informationCategoryType: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择资讯分类类型",
|
message: "请选择资讯分类类型",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
sort: [
|
sort: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择资讯分类排序",
|
message: "请选择资讯分类排序",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//删除deldisease
|
//删除deldisease
|
||||||
deldisease(index) {
|
deldisease(index) {
|
||||||
this.form.informationCategoryList.splice(index, 1);
|
this.form.informationCategoryList.splice(index, 1);
|
||||||
},
|
},
|
||||||
adddisease() {
|
adddisease() {
|
||||||
var obj = {
|
var obj = {
|
||||||
informationCategoryName: "",
|
informationCategoryName: "",
|
||||||
informationCategoryType: "",
|
informationCategoryType: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
};
|
};
|
||||||
if (this.form.informationCategoryList.length == 5) {
|
if (this.form.informationCategoryList.length == 5) {
|
||||||
this.$message.error("最多只能5条");
|
this.$message.error("最多只能5条");
|
||||||
@ -320,7 +419,7 @@ export default {
|
|||||||
/** 查询资讯分类列表 */
|
/** 查询资讯分类列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listInformationCategory(this.queryParams).then(response => {
|
listInformationCategory(this.queryParams).then((response) => {
|
||||||
this.InformationCategoryList = response.rows;
|
this.InformationCategoryList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -335,7 +434,7 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
// reset() {
|
// reset() {
|
||||||
// this.form = {
|
// this.form = {
|
||||||
|
|
||||||
// id: null,
|
// id: null,
|
||||||
// informationCategoryCode: null,
|
// informationCategoryCode: null,
|
||||||
// informationCategoryName: null,
|
// informationCategoryName: null,
|
||||||
@ -346,23 +445,23 @@ export default {
|
|||||||
// updateBy: null,
|
// updateBy: null,
|
||||||
// updateTime: null
|
// updateTime: null
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// this.resetForm("form");
|
// this.resetForm("form");
|
||||||
// },
|
// },
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
informationCategoryList: [
|
informationCategoryList: [
|
||||||
{
|
{
|
||||||
// id: null,
|
// id: null,
|
||||||
// informationCategoryCode: null,
|
// informationCategoryCode: null,
|
||||||
informationCategoryName: null,
|
informationCategoryName: null,
|
||||||
informationCategoryType: null,
|
informationCategoryType: null,
|
||||||
sort: null,
|
sort: null,
|
||||||
// createBy: null,
|
// createBy: null,
|
||||||
// createTime: null,
|
// createTime: null,
|
||||||
// updateBy: null,
|
// updateBy: null,
|
||||||
// updateTime: null
|
// updateTime: null
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -380,9 +479,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
@ -393,8 +492,8 @@ export default {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getInformationCategory(id).then(response => {
|
getInformationCategory(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改资讯分类";
|
this.title = "修改资讯分类";
|
||||||
@ -402,16 +501,16 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateInformationCategory(this.form).then(response => {
|
updateInformationCategory(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addInformationCategory(this.form).then(response => {
|
addInformationCategory(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.addopen = false;
|
this.addopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -423,19 +522,27 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除资讯分类编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
return delInformationCategory(ids);
|
.confirm('是否确认删除资讯分类编号为"' + ids + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return delInformationCategory(ids);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/InformationCategory/export', {
|
this.download(
|
||||||
...this.queryParams
|
"system/InformationCategory/export",
|
||||||
}, `InformationCategory_${new Date().getTime()}.xlsx`)
|
{
|
||||||
}
|
...this.queryParams,
|
||||||
}
|
},
|
||||||
|
`InformationCategory_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -25,22 +25,7 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="联系电话" prop="phone">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.phone"
|
|
||||||
placeholder="请输入联系电话"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<!-- <el-form-item label="显示顺序" prop="hospitalSort">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.hospitalSort"
|
|
||||||
placeholder="请输入显示顺序"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|||||||
@ -8,22 +8,7 @@
|
|||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<!-- <el-form-item label="父级科室id" prop="parentId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.parentId"
|
|
||||||
placeholder="请输入父级科室id"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<!-- <el-form-item label="医院表id" prop="hospitalId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.hospitalId"
|
|
||||||
placeholder="请输入医院表id"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="医院名称" prop="hospitalName">
|
<el-form-item label="医院名称" prop="hospitalName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.hospitalName"
|
v-model="queryParams.hospitalName"
|
||||||
@ -48,46 +33,7 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="科室联系电话,手机号或者座机号" prop="departmentPhone">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.departmentPhone"
|
|
||||||
placeholder="请输入科室联系电话,手机号或者座机号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="科室负责人名称" prop="departmentPerson">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.departmentPerson"
|
|
||||||
placeholder="请输入科室负责人名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="科室地址" prop="departmentAddress">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.departmentAddress"
|
|
||||||
placeholder="请输入科室地址"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="科室显示级别" prop="departmentLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.departmentLevel"
|
|
||||||
placeholder="请输入科室显示级别"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="科室显示顺序" prop="departmentSort">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.departmentSort"
|
|
||||||
placeholder="请输入科室显示顺序"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
697
src/views/system/informationInfo/index.vue
Normal file
697
src/views/system/informationInfo/index.vue
Normal file
@ -0,0 +1,697 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<!-- <el-form-item label="资讯所属分类id" prop="informationCategoryId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationCategoryId"
|
||||||
|
placeholder="请输入资讯所属分类id"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="资讯标题" prop="informationTitle">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationTitle"
|
||||||
|
placeholder="请输入资讯标题"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯编码" prop="informationCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationCode"
|
||||||
|
placeholder="请输入资讯编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="资讯点击次数" prop="informationClickCount">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationClickCount"
|
||||||
|
placeholder="请输入资讯点击次数"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="资讯跳转路径" prop="informationJumpLink">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationJumpLink"
|
||||||
|
placeholder="请输入资讯跳转路径"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯来源,枚举类型" prop="informationSource">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationSource"
|
||||||
|
placeholder="请输入资讯来源,枚举类型"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯主缩略图地址" prop="leadThumbnailUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.leadThumbnailUrl"
|
||||||
|
placeholder="请输入资讯主缩略图地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯负缩略图1地址" prop="negativeOneThumbnailUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.negativeOneThumbnailUrl"
|
||||||
|
placeholder="请输入资讯负缩略图1地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯负缩略图2地址" prop="negativeTwoThumbnailUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.negativeTwoThumbnailUrl"
|
||||||
|
placeholder="请输入资讯负缩略图2地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="资讯大图地址" prop="largePictureUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.largePictureUrl"
|
||||||
|
placeholder="请输入资讯大图地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="显示顺序" prop="informationSort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.informationSort"
|
||||||
|
placeholder="请输入显示顺序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
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>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:informationInfo:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:informationInfo:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:informationInfo:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:informationInfo:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="informationInfoList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<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="informationCategoryId" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="资讯标题"
|
||||||
|
align="center"
|
||||||
|
prop="informationTitle"
|
||||||
|
/>
|
||||||
|
<el-table-column label="资讯编码" align="center" prop="informationCode" />
|
||||||
|
|
||||||
|
<el-table-column label="显示顺序" align="center" prop="informationSort" />
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:informationInfo:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:informationInfo:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
: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-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="140px"
|
||||||
|
:inline="true"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-form-item label="资讯标题" prop="informationTitle">
|
||||||
|
<el-input
|
||||||
|
v-model="form.informationTitle"
|
||||||
|
placeholder="请输入资讯标题"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类" prop="informationCategoryId">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="form.informationCategoryName == '请选择资讯分类'"
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
style="
|
||||||
|
width: 250px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ form.informationCategoryName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 250px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ form.informationCategoryName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="资讯主缩略图上传" prop="leadThumbnailUrl">
|
||||||
|
<stationAcatar
|
||||||
|
style="width: 208px"
|
||||||
|
@imgUrl="imgUrl"
|
||||||
|
:img="form.leadThumbnailUrl"
|
||||||
|
:type="'leadThumbnailUrl'"
|
||||||
|
/>
|
||||||
|
<!-- <el-input v-model="form.leadThumbnailUrl" placeholder="请输入资讯主缩略图地址" /> -->
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="显示顺序" prop="informationSort">
|
||||||
|
<el-input
|
||||||
|
v-model="form.informationSort"
|
||||||
|
placeholder="请输入显示顺序"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯图文内容" prop="informationContent">
|
||||||
|
<editor
|
||||||
|
@imgs="imgs"
|
||||||
|
|
||||||
|
maxlength="300"
|
||||||
|
:min-height="102"
|
||||||
|
placeholder="请输入资讯图文内容"
|
||||||
|
style="width: 80%;margin-left:18%;margin-top: -5%;"
|
||||||
|
v-model="form.informationContent"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 选择资讯 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择资讯"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="innerVisiblecancel"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="queryForm"
|
||||||
|
:model="nurseStationqueryParams"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类编码"
|
||||||
|
prop="informationCategoryCode"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="nurseStationqueryParams.informationCategoryCode"
|
||||||
|
placeholder="请输入资讯分类编码"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类名称"
|
||||||
|
prop="informationCategoryName"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="nurseStationqueryParams.informationCategoryName"
|
||||||
|
placeholder="请输入资讯分类名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="informationInfoinfo"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="infolist"
|
||||||
|
@cell-dblclick="nurseclick"
|
||||||
|
v-loading="loading"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="form.informationCategoryId == 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>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="informationCategoryCode"
|
||||||
|
label="资讯分类编码"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="informationCategoryName"
|
||||||
|
label="资讯名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<!-- <el-table-column
|
||||||
|
property="hospitalAddress"
|
||||||
|
label="医院地址"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <el-table-column
|
||||||
|
property="hospitalIntroduce"
|
||||||
|
label="医院介绍"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <el-table-column
|
||||||
|
property="phone"
|
||||||
|
label="联系电话"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column> -->
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total2 > 0"
|
||||||
|
:total="total2"
|
||||||
|
:page.sync="nurseStationqueryParams.pageNum"
|
||||||
|
:limit.sync="nurseStationqueryParams.pageSize"
|
||||||
|
@pagination="informationInfoinfo"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listInformationInfo,
|
||||||
|
getInformationInfo,
|
||||||
|
delInformationInfo,
|
||||||
|
addInformationInfo,
|
||||||
|
updateInformationInfo,
|
||||||
|
listInformationCategory,
|
||||||
|
} from "@/api/system/informationInfo";
|
||||||
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
|
export default {
|
||||||
|
components: { stationAcatar },
|
||||||
|
name: "InformationInfo",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
innerVisible: false,
|
||||||
|
nurseStationqueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
informationCategoryCode: "",
|
||||||
|
informationCategoryName: "",
|
||||||
|
},
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 资讯信息管理表格数据
|
||||||
|
informationInfoList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
total2: 0,
|
||||||
|
imgsurl: { pictureUrlList: [] },
|
||||||
|
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
informationCategoryId: null,
|
||||||
|
informationTitle: null,
|
||||||
|
informationCode: null,
|
||||||
|
informationContent: null,
|
||||||
|
informationClickCount: null,
|
||||||
|
informationJumpLink: null,
|
||||||
|
informationSource: null,
|
||||||
|
leadThumbnailUrl: null,
|
||||||
|
negativeOneThumbnailUrl: null,
|
||||||
|
negativeTwoThumbnailUrl: null,
|
||||||
|
largePictureUrl: null,
|
||||||
|
informationSort: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
informationCategoryId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
informationTitle: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯标题",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
leadThumbnailUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "请选择缩略图",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
informationSort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "请输入显示顺序",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
informationContent: [
|
||||||
|
{ required: true, message: "请输入资讯图文内容", trigger: "blur" },
|
||||||
|
],
|
||||||
|
// informationContent: [
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// message: "请输入资讯图文内容",
|
||||||
|
// trigger: "blur",
|
||||||
|
// message: "",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
},
|
||||||
|
infolist: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.addopen = false;
|
||||||
|
// this.reset();
|
||||||
|
},
|
||||||
|
|
||||||
|
innerVisiblecancel() {
|
||||||
|
this.innerVisible = false;
|
||||||
|
},
|
||||||
|
addresetQuery() {
|
||||||
|
this.nurseStationqueryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
informationCategoryCode: "",
|
||||||
|
informationCategoryName: "",
|
||||||
|
};
|
||||||
|
this.informationInfoinfo();
|
||||||
|
},
|
||||||
|
informationInfoinfo() {
|
||||||
|
listInformationCategory(this.nurseStationqueryParams).then((response) => {
|
||||||
|
this.infolist = response.rows;
|
||||||
|
console.log(this.infolist);
|
||||||
|
this.total2 = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增医院按钮
|
||||||
|
clickinnerVisible() {
|
||||||
|
this.informationInfoinfo();
|
||||||
|
// this.form.informationCategoryId =
|
||||||
|
// this.nurseStationqueryParams.informationCategoryId;
|
||||||
|
// this.nnerVisibleindex = index;
|
||||||
|
// console.log(this.nnerVisibleindex);
|
||||||
|
this.innerVisible = true;
|
||||||
|
|
||||||
|
},
|
||||||
|
imgUrl(imgUrl) {
|
||||||
|
this.form.leadThumbnailUrl = imgUrl;
|
||||||
|
},
|
||||||
|
imgs(item) {
|
||||||
|
this.imgsurl.pictureUrlList.push(item);
|
||||||
|
},
|
||||||
|
/** 查询资讯信息管理列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listInformationInfo(this.queryParams).then((response) => {
|
||||||
|
this.informationInfoList = response.rows;
|
||||||
|
console.log(this.informationInfoList);
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
nurseclick(row) {
|
||||||
|
console.log(row);
|
||||||
|
// if (this.homenumber) {
|
||||||
|
// console.log(this.homenumber);
|
||||||
|
// this.form.hospitalName = row.hospitalName;
|
||||||
|
// this.form.hospitalId = row.id;
|
||||||
|
// } else {
|
||||||
|
this.form.informationCategoryId = row.id;
|
||||||
|
this.form.informationCategoryName = row.informationCategoryName;
|
||||||
|
|
||||||
|
// }
|
||||||
|
this.innerVisible = false;
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
informationCategoryId: null,
|
||||||
|
informationTitle: null,
|
||||||
|
informationCode: null,
|
||||||
|
informationContent: null,
|
||||||
|
informationClickCount: null,
|
||||||
|
informationJumpLink: null,
|
||||||
|
informationSource: null,
|
||||||
|
leadThumbnailUrl: null,
|
||||||
|
negativeOneThumbnailUrl: null,
|
||||||
|
negativeTwoThumbnailUrl: null,
|
||||||
|
largePictureUrl: null,
|
||||||
|
informationSort: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.form.informationCategoryName="请选择资讯分类";
|
||||||
|
this.title = "添加资讯信息管理";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getInformationInfo(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改资讯信息管理";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateInformationInfo(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addInformationInfo(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除资讯信息管理编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delInformationInfo(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"system/informationInfo/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`informationInfo_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user