|
@@ -30,6 +30,11 @@
|
|
|
label="操作时间"
|
|
|
:show-overflow-tooltip="true">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ :resizable = "false"
|
|
|
+ prop="typeName"
|
|
|
+ label="类型">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
:resizable = "false"
|
|
|
prop="name"
|
|
@@ -48,14 +53,14 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
|
|
|
<span style="margin:0 3px;">|</span>
|
|
|
- <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row.id)">删除</el-button>
|
|
|
+ <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
:resizable = "false"
|
|
|
label="详情">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="getDetailList(scope.row.id)">详情</el-button>
|
|
|
+ <el-button type="text" size="small" @click="getDetailList(scope.row)">详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -97,10 +102,23 @@
|
|
|
},
|
|
|
methods: {
|
|
|
toEditProduct(row){
|
|
|
- this.$router.push({
|
|
|
- name:'AddCommonSymptom',
|
|
|
- params: {info:row}
|
|
|
- })
|
|
|
+ const param = {
|
|
|
+ "deptId": row.id,
|
|
|
+ "type": row.type
|
|
|
+ }
|
|
|
+ api.getCommonSymptomById(param).then((res)=>{
|
|
|
+ const {code,data,msg} = res.data;
|
|
|
+ if(code=='0'){
|
|
|
+ const item = Object.assign({},row,data);
|
|
|
+ this.$router.push({name:'AddCommonSymptom',params:{isEdit:true,data:item}});
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: msg,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
filterDatas(){
|
|
|
this.currentPage = 1;
|
|
@@ -122,24 +140,23 @@
|
|
|
console.log(error);
|
|
|
});
|
|
|
},
|
|
|
- getDetailList(id) {
|
|
|
- const param = {'id': id,};
|
|
|
- this.$router.push({name:'AddCommonSymptom', params:{id: id}})
|
|
|
- /*api.getDeptInfoDetials(param).then((res) => {
|
|
|
- if (res.data.code == '0') {
|
|
|
- this.$router.push({name:'DeptInfoDetail', params:{id: id}})
|
|
|
- // console.log("详情接口调用成功");
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message:res.data.msg,
|
|
|
- type:'warning'
|
|
|
- });
|
|
|
- this.getDataList() //刷新列表
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- console.log(error);
|
|
|
- });*/
|
|
|
+ getDetailList(row) {
|
|
|
+ const param = {
|
|
|
+ "deptId": row.id,
|
|
|
+ "type": row.type
|
|
|
+ }
|
|
|
+ api.getCommonSymptomById(param).then((res)=>{
|
|
|
+ const {code,data,msg} = res.data;
|
|
|
+ if(code=='0'){
|
|
|
+ const item = Object.assign({},row,data);
|
|
|
+ this.$router.push({name:'AddCommonSymptom',params:{isEdit:true,data:item}});
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: msg,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
getFilterItems() {
|
|
|
const param = {
|
|
@@ -175,9 +192,13 @@
|
|
|
resolve();
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- showDelDialog(id){
|
|
|
+ showDelDialog(row){
|
|
|
this.showConfirmDialog('是否删除该科室症状?',()=>{
|
|
|
- api.delCommonSymptom({'deptId':id}).then((res)=>{
|
|
|
+ const param = {
|
|
|
+ "deptId": row.id,
|
|
|
+ "type": row.type
|
|
|
+ }
|
|
|
+ api.delCommonSymptom(param).then((res)=>{
|
|
|
if(res.data.code=='0'){
|
|
|
this.warning(res.data.msg||'操作成功','success');
|
|
|
this.getDataList();
|