Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8e2faf1634
12
src/api/manage/indicatorMonitoring.js
Normal file
12
src/api/manage/indicatorMonitoring.js
Normal file
@ -0,0 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 查询检测检测项目结果曲线统计
|
||||
export function curveStatistics(query) {
|
||||
return request({
|
||||
url: `/manage/projectResult/curveStatistics`,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
54
src/api/system/partition.js
Normal file
54
src/api/system/partition.js
Normal file
@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询任务细分字典列表
|
||||
export function listPartition(query) {
|
||||
return request({
|
||||
url: '/system/partition/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 任务类型名称下拉框
|
||||
export function selectTaskTypeList(query) {
|
||||
return request({
|
||||
url: '/system/taskType/selectTaskTypeList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询任务细分字典详细
|
||||
export function getPartition(id) {
|
||||
return request({
|
||||
url: '/system/partition/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增任务细分字典
|
||||
export function addPartition(data) {
|
||||
return request({
|
||||
url: '/system/partition/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改任务细分字典
|
||||
export function updatePartition(data) {
|
||||
return request({
|
||||
url: '/system/partition/edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除任务细分字典
|
||||
export function delPartition(id) {
|
||||
return request({
|
||||
url: '/system/partition/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
44
src/api/system/taskType.js
Normal file
44
src/api/system/taskType.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询任务类型字典列表
|
||||
export function listTaskType(query) {
|
||||
return request({
|
||||
url: '/system/taskType/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询任务类型字典详细
|
||||
export function getTaskType(id) {
|
||||
return request({
|
||||
url: '/system/taskType/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增任务类型字典
|
||||
export function addTaskType(data) {
|
||||
return request({
|
||||
url: '/system/taskType/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改任务类型字典
|
||||
export function updateTaskType(data) {
|
||||
return request({
|
||||
url: '/system/taskType/edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除任务类型字典
|
||||
export function delTaskType(id) {
|
||||
return request({
|
||||
url: '/system/taskType/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -9,67 +9,200 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightheader">
|
||||
<div class="time">
|
||||
<el-date-picker v-model="measureTime" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
:clearable="false" value-format="yyyy-MM-dd" :picker-options="pickerOptions" end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div id="main"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
import {
|
||||
curveStatistics
|
||||
} from '@/api/manage/indicatorMonitoring'
|
||||
export default {
|
||||
name: "indicatorMonitoring",
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() > Date.now(); //禁止选择今天以后的时间
|
||||
},
|
||||
},
|
||||
measureTime: [],
|
||||
//左侧类型选中
|
||||
categoryindex: 0,
|
||||
//左侧选中的item
|
||||
categoryItem: {},
|
||||
categoryindex: undefined,
|
||||
//左侧list
|
||||
categorylist: [{
|
||||
id: 1,
|
||||
title: '冠状动脉粥样硬化性心脏病',
|
||||
title: '运动检测',
|
||||
groupCode: 'sport'
|
||||
}, {
|
||||
id: 2,
|
||||
title: '冠状动脉粥样硬化性心脏病冠状动脉粥样硬化性心脏病',
|
||||
}]
|
||||
title: '血压测量',
|
||||
groupCode: 'bp'
|
||||
}, {
|
||||
id: 3,
|
||||
title: '血糖测量',
|
||||
groupCode: 'bg'
|
||||
}],
|
||||
query: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.categoryItem = this.categorylist[0]
|
||||
},
|
||||
mounted() {
|
||||
this.info();
|
||||
this.categoryindex = 0
|
||||
this.query.groupCode = this.categorylist[0].groupCode
|
||||
this.query.patientId = this.$route.query.patientId
|
||||
this.query.title = '运动检测'
|
||||
this.getinfo();
|
||||
},
|
||||
watch: {
|
||||
'measureTime': {
|
||||
handler(newValue, oldValue) {
|
||||
this.query.measureTimeStart = newValue[0]
|
||||
this.query.measureTimeEnd = newValue[1]
|
||||
this.getinfo();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
clickcategory(item, index) {
|
||||
this.categoryindex = index
|
||||
this.categoryItem = item
|
||||
this.query.groupCode = item.groupCode
|
||||
this.query.title = item.title
|
||||
this.query.patientId = this.$route.query.patientId
|
||||
this.getinfo();
|
||||
},
|
||||
info() {
|
||||
getinfo() {
|
||||
curveStatistics(this.query).then(res => {
|
||||
this.info(res.data);
|
||||
})
|
||||
},
|
||||
info(row) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
var myChart = echarts.init(document.getElementById('main'));
|
||||
// 绘制图表
|
||||
myChart.setOption({
|
||||
title: {
|
||||
text: '运动监测'
|
||||
},
|
||||
tooltip: {},
|
||||
xAxis: {
|
||||
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子', '衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
|
||||
},
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
name: '销量',
|
||||
type: 'bar',
|
||||
data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 20]
|
||||
}
|
||||
]
|
||||
});
|
||||
var chartDom = document.getElementById('main');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
if (this.query.title == '运动检测') {
|
||||
option = {
|
||||
title: {
|
||||
text: this.query.title
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '0%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: row.xlist
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '运动时长',
|
||||
type: 'line',
|
||||
data: row.ylist.运动时长
|
||||
},
|
||||
{
|
||||
name: '平均心率',
|
||||
type: 'line',
|
||||
data: row.ylist.平均心率
|
||||
}
|
||||
]
|
||||
};
|
||||
} else if (this.query.title == '血压测量') {
|
||||
option = {
|
||||
title: {
|
||||
text: this.query.title
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '0%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: row.xlist
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '收缩压',
|
||||
type: 'line',
|
||||
data: row.ylist.收缩压
|
||||
},
|
||||
{
|
||||
name: '舒张压',
|
||||
type: 'line',
|
||||
data: row.ylist.舒张压
|
||||
}
|
||||
]
|
||||
};
|
||||
} else if (this.query.title == '血糖测量') {
|
||||
option = {
|
||||
title: {
|
||||
text: this.query.title
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '0%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: row.xlist
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '空腹血糖',
|
||||
type: 'line',
|
||||
data: row.ylist.收缩压
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
background-color: #fff !important;
|
||||
@ -80,11 +213,18 @@ export default {
|
||||
width: 75%;
|
||||
padding-top: 20px;
|
||||
border-left: 3px solid #DFE4ED;
|
||||
position: relative;
|
||||
|
||||
.time {
|
||||
position: absolute;
|
||||
right: 50px;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
#main {
|
||||
width: 1000px;
|
||||
height: 450px;
|
||||
margin: 0 auto;
|
||||
margin: 80px auto;
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,5 +255,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
</style>
|
||||
@ -239,6 +239,11 @@
|
||||
<el-form-item label="短信ID" prop="textMessageId">
|
||||
<el-input v-model="form.textMessageId" placeholder="请输入短信ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="短信排序" prop="textMessageSort">
|
||||
<el-input-number v-model="form.textMessageSort" controls-position="right" :min="0" placeholder="" style="width:380px"/>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="短信内容" prop="textMessageContent">
|
||||
<el-input
|
||||
v-model="form.textMessageContent"
|
||||
@ -613,6 +618,9 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
textMessageSort: [
|
||||
{ required: true, message: "短信排序不能为空", trigger: "blur" }
|
||||
],
|
||||
textMessageName: [
|
||||
{ required: true, message: "短信模板名称不能为空", trigger: "blur" }
|
||||
],
|
||||
@ -808,7 +816,7 @@ export default {
|
||||
textMessageContent: null,
|
||||
textMessageChannel: null,
|
||||
textMessageStatus: null,
|
||||
textMessageSort: null,
|
||||
textMessageSort: undefined,
|
||||
textMessageRemark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
@ -930,6 +938,9 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-input-number .el-input__inner{
|
||||
text-align: left;
|
||||
}
|
||||
.leftmessage {
|
||||
height: 600px;
|
||||
overflow: auto;
|
||||
|
||||
@ -238,6 +238,10 @@
|
||||
maxlength="100"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="话术排序" prop="scriptSort">
|
||||
<el-input-number v-model="form.scriptSort" controls-position="right" :min="0" placeholder="" style="width:380px"/>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="话术ID" prop="scriptId">
|
||||
<el-input
|
||||
v-model="form.scriptId"
|
||||
@ -685,6 +689,9 @@ export default {
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
scriptSort:[
|
||||
{ required: true, message: "话术排序不能为空", trigger: "blur" }
|
||||
],
|
||||
commonScriptName: [
|
||||
{ required: true, message: "通用话术名称不能为空", trigger: "blur" }
|
||||
],
|
||||
@ -882,6 +889,7 @@ export default {
|
||||
this.form = {
|
||||
id: null,
|
||||
departmentId: null,
|
||||
scriptSort:undefined,
|
||||
departmentName: null,
|
||||
diseaseTypeId: null,
|
||||
diseaseTypeName: null,
|
||||
@ -893,7 +901,6 @@ export default {
|
||||
platformId: null,
|
||||
scriptStatus: "",
|
||||
scriptIntroduction: null,
|
||||
scriptSort: null,
|
||||
scriptRemark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
@ -1037,6 +1044,9 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-input-number .el-input__inner{
|
||||
text-align: left;
|
||||
}
|
||||
.leftscript {
|
||||
// width: 30%;
|
||||
height: 850px;
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
<el-table-column
|
||||
label="病种名称"
|
||||
align="center"
|
||||
prop="templateSort"
|
||||
prop="diseaseTypeName"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
@ -189,6 +189,10 @@
|
||||
<el-form-item label="模板ID" prop="templateId">
|
||||
<el-input v-model="form.templateId" placeholder="请输入模板ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信排序" prop="templateSort">
|
||||
<el-input-number v-model="form.templateSort" controls-position="right" :min="0" placeholder="" style="width:380px"/>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="模板内容" prop="templateContent">
|
||||
<el-input
|
||||
v-model="form.templateContent"
|
||||
@ -455,12 +459,13 @@ export default {
|
||||
name: "Template",
|
||||
data() {
|
||||
return {
|
||||
count: '',//全部
|
||||
|
||||
itemname: null,
|
||||
departmentName: null,
|
||||
diseaseTypeName: null,
|
||||
name: '',
|
||||
departmentId: null,
|
||||
count: '',//全部
|
||||
DepartmentoList: [],//左侧数组
|
||||
// 左侧传值
|
||||
querydepartmen: {
|
||||
@ -540,6 +545,9 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
templateSort: [
|
||||
{ required: true, message: "微信排序不能为空", trigger: "blur" }
|
||||
],
|
||||
wechatTemplateName: [
|
||||
{ required: true, message: "微信模板名称不能为空", trigger: "blur" }
|
||||
],
|
||||
@ -614,7 +622,6 @@ export default {
|
||||
// 左侧科室
|
||||
itemdata(item) {
|
||||
if (item) {
|
||||
|
||||
this.itemname = item.id
|
||||
this.departmentName = item.departmentName
|
||||
this.loading = true;
|
||||
@ -717,6 +724,7 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
templateSort:undefined,
|
||||
departmentId: null,
|
||||
dictCode: null,
|
||||
departmentName: null,
|
||||
@ -725,7 +733,6 @@ export default {
|
||||
templateId: null,
|
||||
templateContent: null,
|
||||
templateSource: null,
|
||||
templateSort: null,
|
||||
templateRemark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
@ -852,6 +859,9 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-input-number .el-input__inner{
|
||||
text-align: left;
|
||||
}
|
||||
.left {
|
||||
height: 530px;
|
||||
overflow: auto;
|
||||
|
||||
@ -124,6 +124,7 @@
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="patientInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||
<el-table-column label="住院号" align="center" prop="admissionNumber" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<el-table-column label="电话" align="center" prop="patientPhone" width='120' />
|
||||
@ -169,12 +170,14 @@
|
||||
<el-table-column label="手术名称" align="center" prop="surgicalName" />
|
||||
<!-- <el-table-column label="出院方式" align="center" prop="dischargeMethod" /> -->
|
||||
<el-table-column label="患者来源" align="center" prop="patientSource">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.patient_source" :value="scope.row.patientSource" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="住址" align="center" prop="address" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="handleAuthRole(scope.row)">详情</el-button>
|
||||
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"
|
||||
@ -272,8 +275,8 @@
|
||||
<el-input v-model="form.surgicalName" placeholder="请输入手术名称" style="width:200px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入院时间" prop="admissionDate">
|
||||
<el-date-picker clearable v-model="form.admissionDate" type="date" value-format="yyyy-MM-dd" style="width:200px"
|
||||
placeholder="请选择入院时间">
|
||||
<el-date-picker clearable v-model="form.admissionDate" type="date" value-format="yyyy-MM-dd"
|
||||
style="width:200px" placeholder="请选择入院时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="病历内容">
|
||||
@ -368,6 +371,7 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, updatePatientInfo } from "@/api/manage/patientInfo";
|
||||
import { getAge } from "@/utils/age";
|
||||
@ -755,6 +759,7 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
font-size: 16px;
|
||||
|
||||
@ -188,6 +188,15 @@
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手术排序" prop="sort">
|
||||
<el-input-number v-model="form.sort" controls-position="right" :min="0" placeholder="" style="width:380px"/>
|
||||
<!-- <el-input
|
||||
v-model="form.sort"
|
||||
placeholder="请输入手术排序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
/> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="术式信息" prop="operationInfo">
|
||||
<el-input
|
||||
@ -362,10 +371,10 @@ export default {
|
||||
departmentId: null,
|
||||
departmentName: null,
|
||||
operationName: null,
|
||||
sort:null,
|
||||
operationCode: null,
|
||||
operationInfo: null,
|
||||
operationRemark: null,
|
||||
sort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
@ -384,6 +393,9 @@ export default {
|
||||
operationInfo: [
|
||||
{ required: true, message: "术式信息不能为空", trigger: "blur" }
|
||||
],
|
||||
sort:[
|
||||
{ required: true, message: "手术排序不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -440,23 +452,6 @@ export default {
|
||||
this.diseaseTypeName = '请选择病种';
|
||||
this.innerVisibleshow = false;
|
||||
},
|
||||
|
||||
// 左侧科室
|
||||
// itemdata(item) {
|
||||
// if (item) {
|
||||
// this.itemname = item.id
|
||||
// this.form.departmentId = this.itemname
|
||||
// this.form.departmentName = item.departmentName
|
||||
// this.loading = true;
|
||||
// this.queryParams.departmentId = this.itemname
|
||||
// this.getList()
|
||||
// } else {
|
||||
// this.queryParams.departmentId = ''
|
||||
// this.itemname = null
|
||||
// this.getList()
|
||||
|
||||
// }
|
||||
// },
|
||||
// 左侧科室
|
||||
itemdata(item) {
|
||||
if (item) {
|
||||
@ -479,7 +474,6 @@ export default {
|
||||
let sum = 0;
|
||||
this.DepartmentoList.forEach((item) => {
|
||||
if (item.countNum != null) {
|
||||
console.log(item.countNum)
|
||||
sum += item.countNum;
|
||||
}
|
||||
this.count = sum;
|
||||
@ -494,7 +488,6 @@ export default {
|
||||
listOperationInfo(this.queryParams).then(response => {
|
||||
this.operationInfoList = response.rows;
|
||||
this.operationInfoList.forEach(e => {
|
||||
console.log(e)
|
||||
})
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -511,13 +504,13 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
// departmentId: null,
|
||||
// departmentName: null,
|
||||
departmentId: null,
|
||||
departmentName: null,
|
||||
operationName: null,
|
||||
operationCode: null,
|
||||
operationInfo: null,
|
||||
operationRemark: null,
|
||||
sort: null,
|
||||
sort: undefined,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
@ -554,19 +547,6 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
// console.log(this.itemname)
|
||||
// if (!this.itemname) {
|
||||
// this.$modal.msgError("请先选择科室");
|
||||
// } else {
|
||||
// // this.reset();
|
||||
// this.form.operationName = null;
|
||||
// this.form.operationInfo = null;
|
||||
// this.open = true;
|
||||
// this.title = "添加手术信息";
|
||||
// if (this.title == "添加手术信息") {
|
||||
// this.disabled = false;
|
||||
// }
|
||||
// }
|
||||
this.reset();
|
||||
if (this.itemname) {
|
||||
this.form.departmentName = this.departmentName
|
||||
@ -589,11 +569,8 @@ export default {
|
||||
this.open = true;
|
||||
const id = row.id || this.ids
|
||||
getOperationInfo(id).then(response => {
|
||||
this.form.operationInfo = response.data.operationInfo;
|
||||
this.form.operationName = response.data.operationName;
|
||||
this.form.departmentId = response.data.departmentId;
|
||||
this.form.departmentName = response.data.departmentName;
|
||||
this.form.id = response.data.id;
|
||||
this.form = response.data;
|
||||
this.departmentName = response.data.departmentName;
|
||||
this.open = true;
|
||||
this.title = "修改手术信息";
|
||||
if (this.title == "修改手术信息") {
|
||||
@ -604,11 +581,11 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.departmentName = this.departmentName
|
||||
console.log(this.form,'0000')
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id!=null) {
|
||||
this.form.departmentName = this.departmentName
|
||||
updateOperationInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -622,7 +599,6 @@ export default {
|
||||
|
||||
} else {
|
||||
this.form.departmentName = this.departmentName
|
||||
console.log(this.form,'1111')
|
||||
}
|
||||
addOperationInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
@ -655,6 +631,10 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-input-number .el-input__inner{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.left {
|
||||
height: 530px;
|
||||
overflow: auto;
|
||||
|
||||
422
src/views/system/partition/index.vue
Normal file
422
src/views/system/partition/index.vue
Normal file
@ -0,0 +1,422 @@
|
||||
<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="任务细分名称" prop="taskPartitionName">
|
||||
<el-input
|
||||
v-model="queryParams.taskPartitionName"
|
||||
placeholder="请输入任务细分名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务细分编码" prop="taskPartitionCode">
|
||||
<el-input
|
||||
v-model="queryParams.taskPartitionCode"
|
||||
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:partition: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:partition: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:partition:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="partitionList"
|
||||
@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="taskTypeId" /> -->
|
||||
<el-table-column
|
||||
label="任务类型名称"
|
||||
align="center"
|
||||
prop="taskTypeName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="任务细分名称"
|
||||
align="center"
|
||||
prop="taskPartitionName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="任务细分编码"
|
||||
align="center"
|
||||
prop="taskPartitionCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="二级分类描述"
|
||||
align="center"
|
||||
prop="secondClassifyDescribe"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="执行时间"
|
||||
align="center"
|
||||
prop="executionTime"
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="任务细分排序"
|
||||
align="center"
|
||||
prop="taskPartitionSort"
|
||||
/>
|
||||
<el-table-column
|
||||
label="任务细分备注"
|
||||
align="center"
|
||||
prop="taskPartitionRemark"
|
||||
/>
|
||||
<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:partition:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:partition: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="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<!-- <el-form-item label="任务类型表id" prop="taskTypeId">
|
||||
<el-input v-model="form.taskTypeId" placeholder="请输入任务类型表id" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="任务细分编码" prop="taskPartitionCode" v-if="form.taskPartitionCode">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="form.taskPartitionCode"
|
||||
placeholder="请输入任务细分编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型名称" prop="taskTypeName">
|
||||
<el-select v-model="form.taskTypeId" placeholder="请选择" @change="change" style="width:350px">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.taskTypeName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务细分名称" prop="taskPartitionName">
|
||||
<el-input
|
||||
v-model="form.taskPartitionName"
|
||||
placeholder="请输入任务细分名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="二级分类描述" prop="secondClassifyDescribe">
|
||||
<el-input
|
||||
v-model="form.secondClassifyDescribe"
|
||||
placeholder="请输入二级分类描述"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="执行时间" prop="executionTime">
|
||||
<el-time-select
|
||||
style="width: 350px"
|
||||
placeholder="执行时间"
|
||||
v-model="form.executionTime"
|
||||
:picker-options="{
|
||||
start: '08:00',
|
||||
step: '00:30',
|
||||
end: '23:30',
|
||||
}"
|
||||
></el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务细分排序" prop="taskPartitionSort">
|
||||
<el-input-number
|
||||
v-model="form.taskPartitionSort"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
placeholder=""
|
||||
style="width: 350px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务细分备注" prop="taskPartitionRemark">
|
||||
<el-input
|
||||
v-model="form.taskPartitionRemark"
|
||||
placeholder="请输入任务细分备注"
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPartition, getPartition, delPartition, addPartition, updatePartition, selectTaskTypeList } from "@/api/system/partition";
|
||||
|
||||
export default {
|
||||
name: "Partition",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 任务细分字典表格数据
|
||||
partitionList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskTypeId: null,
|
||||
taskTypeName: null,
|
||||
taskPartitionName: null,
|
||||
taskPartitionCode: null,
|
||||
secondClassifyDescribe: null,
|
||||
executionTime: null,
|
||||
taskPartitionSort: null,
|
||||
taskPartitionRemark: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
options:[],
|
||||
// 表单校验
|
||||
rules: {
|
||||
taskTypeId: [
|
||||
{ required: true, message: "任务细分名称不能为空", trigger: "blur" }
|
||||
],
|
||||
taskTypeName: [
|
||||
{ required: true, message: "任务类型名称不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getlistselect();
|
||||
},
|
||||
methods: {
|
||||
/** 查询任务细分字典列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPartition(this.queryParams).then(response => {
|
||||
this.partitionList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 任务类型名称下拉框
|
||||
getlistselect() {
|
||||
selectTaskTypeList().then(response => {
|
||||
this.options = response.data;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
// 任务类型名称点击事件
|
||||
change(e){
|
||||
this.form.taskTypeId=e
|
||||
this.form.taskTypeName=this.options.find(f=>f.id==e).taskTypeName
|
||||
console.log(e)
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
taskTypeId: null,
|
||||
taskTypeName: null,
|
||||
taskPartitionName: null,
|
||||
taskPartitionCode: null,
|
||||
secondClassifyDescribe: null,
|
||||
executionTime: null,
|
||||
taskPartitionSort: undefined,
|
||||
taskPartitionRemark: 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.form.executionTime=null;
|
||||
this.getlistselect();
|
||||
this.open = true;
|
||||
this.title = "添加任务细分字典";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.getlistselect();
|
||||
const id = row.id || this.ids
|
||||
getPartition(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改任务细分字典";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form)
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePartition(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPartition(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 delPartition(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/partition/export', {
|
||||
...this.queryParams
|
||||
}, `partition_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@ -40,9 +40,9 @@
|
||||
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" />
|
||||
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus">
|
||||
<template slot-scope="scope">
|
||||
<!-- active-text="已发布" inactive-text="未发布" -->
|
||||
<el-switch v-model="scope.row.questionnaireStatus" active-color="#13ce66" inactive-color="#ff4949"
|
||||
active-value="PUBLISHED" inactive-value="UNPUBLISHED" active-text="已发布" inactive-text="未发布"
|
||||
@change="switchstatus($event, scope.row)">
|
||||
active-value="PUBLISHED" inactive-value="UNPUBLISHED" @change="switchstatus($event, scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -181,6 +181,8 @@ export default {
|
||||
},
|
||||
cleardepartment() {
|
||||
this.classificationform.diseaseTypeId = ''
|
||||
this.classificationform.departmentName = ''
|
||||
this.classificationform.diseaseTypeName = ''
|
||||
},
|
||||
changedepartment(e) {
|
||||
this.classificationform.departmentName = this.departmentlist.find(el => el.id == e).departmentName
|
||||
@ -196,7 +198,23 @@ export default {
|
||||
},
|
||||
//切换发布状态
|
||||
switchstatus(e, item) {
|
||||
|
||||
if (!item.departmentId && !this.diseaseTypeId) {
|
||||
this.$message.error('请选择问卷所属的科室以及科室病种后发布!');
|
||||
this.getList();
|
||||
return
|
||||
}
|
||||
let query = {
|
||||
id: item.id,
|
||||
questionnaireStatus: e
|
||||
}
|
||||
updateclassification(query).then(res => {
|
||||
if (e == 'PUBLISHED') {
|
||||
this.$modal.msgSuccess("修改为已发布");
|
||||
} else if (e == 'UNPUBLISHED') {
|
||||
this.$modal.msgSuccess("修改为未发布");
|
||||
}
|
||||
})
|
||||
this.getList();
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
|
||||
308
src/views/system/taskType/index.vue
Normal file
308
src/views/system/taskType/index.vue
Normal file
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
||||
<el-form-item label="任务类型名称" prop="taskTypeName">
|
||||
<el-input
|
||||
v-model="queryParams.taskTypeName"
|
||||
placeholder="请输入任务类型名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="任务类型编码" prop="taskTypeCode">
|
||||
<el-input
|
||||
v-model="queryParams.taskTypeCode"
|
||||
placeholder="请输入任务类型编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型排序" prop="taskTypeSort">
|
||||
<el-input
|
||||
v-model="queryParams.taskTypeSort"
|
||||
placeholder="请输入任务类型排序"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型备注" prop="taskTypeRemark">
|
||||
<el-input
|
||||
v-model="queryParams.taskTypeRemark"
|
||||
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:taskType: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:taskType: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:taskType: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:taskType:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="taskTypeList" @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="任务类型名称" align="center" prop="taskTypeName" />
|
||||
<el-table-column label="任务类型编码" align="center" prop="taskTypeCode" />
|
||||
<el-table-column label="任务类型排序" align="center" prop="taskTypeSort" />
|
||||
<el-table-column label="任务类型备注" align="center" prop="taskTypeRemark" />
|
||||
<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:taskType:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:taskType: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="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="任务类型编码" prop="taskTypeCode" v-if="form.taskTypeCode">
|
||||
<el-input v-model="form.taskTypeCode" placeholder="请输入任务类型编码" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型名称" prop="taskTypeName">
|
||||
<el-input v-model="form.taskTypeName" placeholder="请输入任务类型名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="任务类型排序" prop="taskTypeSort">
|
||||
<el-input-number
|
||||
v-model="form.taskTypeSort"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
placeholder=""
|
||||
style="width: 350px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型备注" prop="taskTypeRemark">
|
||||
<el-input v-model="form.taskTypeRemark" placeholder="请输入任务类型备注" />
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTaskType, getTaskType, delTaskType, addTaskType, updateTaskType } from "@/api/system/taskType";
|
||||
|
||||
export default {
|
||||
name: "TaskType",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 任务类型字典表格数据
|
||||
taskTypeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskTypeName: null,
|
||||
taskTypeCode: null,
|
||||
taskTypeSort: null,
|
||||
taskTypeRemark: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
taskTypeName: [
|
||||
{ required: true, message: "任务类型名称不能为空", trigger: "blur" }
|
||||
],
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询任务类型字典列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTaskType(this.queryParams).then(response => {
|
||||
this.taskTypeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
taskTypeName: null,
|
||||
taskTypeCode: null,
|
||||
taskTypeSort: undefined,
|
||||
taskTypeRemark: 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.title = "添加任务类型字典";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getTaskType(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) {
|
||||
updateTaskType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTaskType(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 delTaskType(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/taskType/export', {
|
||||
...this.queryParams
|
||||
}, `taskType_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user