zhangxc пре 6 година
родитељ
комит
6930a001d2

+ 7 - 1
src/api/config.js

@@ -110,7 +110,13 @@ export default {
     'getDepartmentList':'api/icssman/questionUsual/getDeptName', //常见症状维护-科室列表
     'getSymptomList':'api/icssman/questionUsual/getQuestionInfo', //常见科室症状维护--获取症状列表
     'addCommonSymptom': 'api/icssman/questionUsual/addQuestionUsual',  //常见科室症状维护--添加修改科室症状
-    'delCommonSymptom': 'api/icssman/questionUsual/deleteQuestionUsual'  //常见科室症状维护--添加修改科室症状
+    'delCommonSymptom': 'api/icssman/questionUsual/deleteQuestionUsual',  //常见科室症状维护--添加修改科室症状
+    'discInformation': 'api/icssman/disclaimerInformation/getDisclaimerInformations', //免责声明
+    'addDiscInformation': 'api/icssman/disclaimerInformation/addDisclaimerInformations', //免责声明-新增
+    'modifDiscInformation': 'api/icssman/disclaimerInformation/updateDisclaimerInformations', //免责声明-修改
+    'delDiscInformation': 'api/icssman/disclaimerInformation/cancelDisclaimerInformations', //免责声明-删除
+    'closeInformation': 'api/icssman/disclaimerInformation/endDisclaimerInformations', //免责声明-停用
+    'openInformation': 'api/icssman/disclaimerInformation/startDisclaimerInformations', //免责声明-启用
 	},
 	menuIconList: { //菜单对应图标
 		'YH-KZT': 'el-icon-menu',

+ 19 - 1
src/api/icss.js

@@ -107,5 +107,23 @@ export default {
     },
     delCommonSymptom(param) {
         return axios.post(urls.delCommonSymptom, param)
-    }
+    },
+    discInformation(param) {//免责声明
+        return axios.post(urls.discInformation, param)
+    },
+    addDiscInformation(param) {//免责声明-新增
+        return axios.post(urls.addDiscInformation, param)
+    },
+    modifDiscInformation(param) {//免责声明-修改
+        return axios.post(urls.modifDiscInformation, param)
+    },
+    delDiscInformation(param) {//免责声明-删除
+        return axios.post(urls.delDiscInformation, param)
+    },
+    closeInformation(param) {//免责声明-停用
+        return axios.post(urls.closeInformation, param)
+    },
+    openInformation(param) {//免责声明-停用
+        return axios.post(urls.openInformation, param)
+    },
 }

+ 1 - 0
src/api/utils.js

@@ -175,6 +175,7 @@ export default {
   transformKeys(data, tagFlag){   //tagFlag:独立标签还是标签组 ()
     const maps = {
       "controlType": 'region2',                            //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
+      "tagType": 'region2',              //标签类型
       "id": "id",                                    //新增id置空
       "type": 'region1',                //标签归属
       "tagName": 'region3',             //系统名称

+ 2 - 2
src/components/icss/AddDeptInfo.vue

@@ -141,7 +141,7 @@
   .el-button{
     margin: 30px 0 0 20px;
   }
-  .contents{
+  /* .contents{
     position: relative;
     .back{
       position: absolute;
@@ -150,7 +150,7 @@
       z-index: 7;
       cursor: pointer;
     }
-  }
+  } */
   .el-textarea{
     width: 97%;
   }

+ 195 - 0
src/components/icss/AddDisclInfo.vue

@@ -0,0 +1,195 @@
+<!-- 添加机构信息 By_liucf -->
+<template>
+    <div>
+        <crumbs :title="topInfo" linkTo="/admin/LT-YXSJWH-MZSMWH">
+        </crumbs>
+        <div class="contents">
+            <el-form ref="form" :label-position="labelPosition" :model="form" :rules="rules" label-width="65px" class="add-discl-form">
+                <el-form-item label="标题:" prop="title">
+                    <el-input v-model="form.title" placeholder="请输入标题"></el-input>
+                </el-form-item>
+                <el-form-item label="内容:" prop="description" class="discDesc">
+                    <el-input type="textarea" :rows="3" placeholder="请输入内容述" v-model="form.description" maxlength="1024"></el-input>
+                </el-form-item>
+                <el-form-item label="归属:" prop="disclaimerCode">
+                    <el-select v-model="form.disclaimerCode" clearable placeholder="请选择">
+                      <el-option
+                        v-for="item in options"
+                        :key="item.key"
+                        :label="item.name"
+                        :value="item.key">
+                      </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-button class="disclButn" size="small" type="primary" @click="addDiscl">{{text}}</el-button>
+            </el-form>
+        </div>
+    </div>
+</template>
+
+<script>
+  import api from '@api/icss.js';
+  export default {
+    name: 'AddDisclInfo',
+    data(){
+      const titleVaild = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请输入标题'));
+        }
+        if (value.length > 30) {
+           this.form.name = value.substr(0, 120);
+           this.$message({
+             showClose: true,
+             type: 'warning',
+             message: '已超过最大字数限制'
+           })
+        }
+        callback();
+      };
+      /*const descVaild = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请输入内容'));
+        }
+        if (value.length > 1024) {
+           this.form.name = value.substr(0, 120);
+           this.$message({
+             showClose: true,
+             type: 'warning',
+             message: '科室名称最多可输入1024个字'
+           })
+        }
+        callback();
+      };*/
+      const disclVaild = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('请选择归属'));
+        }
+        callback();
+      };
+      return {
+        id:null,
+        labelPosition:'right',
+        options:[],
+        form: {
+          title: '',
+          description: '',//内容
+          disclaimerCode:'' //归属
+        },
+        rules: {
+          title:[
+            { required: true, validator: titleVaild, trigger: ['blur', 'change'] },
+            { required: true, message: '请输入标题', trigger: ['blur', 'change'] }
+          ],
+          description:[
+            // { required: true, validator: descVaild, trigger: ['blur', 'change'] },
+            { required: true, message: '请输入内容', trigger: ['blur', 'change'] }
+          ],
+          disclaimerCode:[
+            { required: true, validator: disclVaild, trigger: ['blur', 'change'] },
+            { required: true, message: '请选择归属', trigger: ['blur', 'change'] }
+          ],
+        },
+        text:'确定添加',
+        topInfo:'免责声明维护-添加免责声明',
+        toast:'添加成功'
+      }
+    },
+    created(){
+      const params = JSON.parse(localStorage.getItem("icssEnumsData"));
+      this.options = params.disclaimerCodeEnum;
+      // 修改
+      const data = this.$route.params.info;
+      if(data){
+        this.id = data.id;
+        this.text = "确定修改";
+        this.topInfo = "免责声明维护-修改";
+        this.toast = "修改成功";
+        this.form.title = data.title;
+        this.form.description = data.description;
+        this.form.disclaimerCode = data.disclaimerCode;
+      }
+    },
+    methods: {
+      addDiscl() {
+        this.$refs.form.validate((valid)=> {
+          if (valid) {
+            // 有id是修改,没有id是添加
+            if(this.id){
+              let param = {
+                id:this.id,
+                title:this.form.title,
+                description:this.form.description,
+                disclaimerCode:this.form.disclaimerCode
+              }
+              api.modifDiscInformation(param).then((res) => {
+                if (res.data.code == '0') {
+                  this.$message({showClose: true,message: this.toast, type: 'success'});
+                  this.$router.push({path: 'LT-YXSJWH-MZSMWH'});
+                } else {
+                  this.$message({
+                    showClose: true,
+                    message: res.data.msg,
+                    type: 'warning'
+                  });
+                }
+              }).catch((error) => {
+                this.$message({
+                  showClose: true,
+                  message: "服务器正忙...",
+                  type: 'warning'
+                });
+              })
+            }else{
+              api.addDiscInformation(this.form).then((res) => {
+                if (res.data.code == '0') {
+                  this.$message({showClose: true,message: this.toast, type: 'success'});
+                  this.$router.push({path: 'LT-YXSJWH-MZSMWH'});
+                } else {
+                  this.$message({
+                    showClose: true,
+                    message: res.data.msg,
+                    type: 'warning'
+                  });
+                }
+              }).catch((error) => {
+                this.$message({
+                  showClose: true,
+                  message: "服务器正忙...",
+                  type: 'warning'
+                });
+              })
+            }  
+          }
+        });
+      },
+      back(){
+        this.$router.go(-1);
+      }
+    }
+  }
+</script>
+
+<style lang="less" >
+    @import "../../less/admin.less";
+
+    .add-discl-form {
+        background: #fff;
+        padding: 20px 20px 30px;
+    }
+
+  // .el-button{
+  .disclButn{
+    margin: 30px 0 0 20px;
+  }
+  
+  .discDesc{
+    // .el-textarea{
+    //   width: 97%;
+    // }
+    margin-top: 10px;
+    margin-bottom: 25px; 
+    .el-form-item__error{
+      top:70px;
+    }
+  }
+</style>

+ 3 - 1
src/components/icss/AddIndeptLabel.vue

@@ -3,7 +3,7 @@
         <div class="groupTitle"><i
                 class="el-icon-back"
                 @click="back"
-        ></i> 独立标签维护--{{this.$route.params.isEdit ? '修改':'添加'}}独立标签</div>
+        ></i> {{txt}}</div>
         <PubIndeptTag
                 @changeVal="changeVal"
                 @changeSex="changeSex"
@@ -37,6 +37,7 @@
     name: 'NoiseTemplateWrapper',
     data() {
       return {
+        txt:'独立标签维护--添加独立标签',
         dataPub: {},      //公用组件传的值都在这
         itemsTypes:[1,2],            //有明细的类型
         editData:{},                    //编辑数据
@@ -54,6 +55,7 @@
     beforeMount:function(){
       const {isEdit,data} = this.$route.params;
       if(isEdit){
+        this.txt = '独立标签维护--修改独立标签'
         this.editData = data;
       }
     },

+ 1 - 6
src/components/icss/DeptInfo.vue

@@ -189,12 +189,7 @@
 
 <style lang="less">
     @import "../../less/admin.less";
-    .status-span{
-        font-size: 12px;
-        margin-right:10px;
-        color: unset;
-    }
     .delete{
-        color: red
+        color: red !important;
     }
 </style>

+ 47 - 0
src/components/icss/DiscInfoDetail.vue

@@ -0,0 +1,47 @@
+<template>
+  <div>
+    <crumbs title="免责声明维护-详情" linkTo="/admin/LT-YXSJWH-MZSMWH"></crumbs>
+    <div class="contents">
+      <div class="deptbox">
+        <p class="titl">标题</p>
+        <p>{{data.title}}</p>
+        <p class="titl marg">内容</p>
+        <p v-html="data.description">{{data.description}}</p>
+        <p class="titl marg">归属</p>
+        <p>{{data.disclaimerCode}}</p>
+      </div>
+    </div>   
+  </div>
+</template>
+<script type="text/javascript">
+  export default{
+    name:'DiscInfoDetail',
+    data(){
+      return{
+        data:{}
+      }
+    },
+    created(){
+      this.data = this.$route.params.info;
+    },
+    methods:{
+    }
+  }
+</script>
+<style lang="less" scoped>
+  @import "../../less/admin.less";
+  .deptbox{
+    // width: 100%;
+    background: #fff;
+    padding: 20px 20px 30px;
+    font-size: 14px;
+    // color: #545455;
+    text-align: left; 
+    .titl{
+      font-weight: bold;
+    }
+    .marg{
+      margin-top: 20px;
+    }
+  }
+</style>

+ 224 - 0
src/components/icss/DisclaimerInformation.vue

@@ -0,0 +1,224 @@
+<template>
+    <div>
+        <crumbs title="免责声明维护">
+            <el-form :inline="true" class="demo-form-inline">
+                <el-form-item label="标题:">
+                    <el-input size="mini" v-model="filter.title" placeholder="输入标题"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button size="mini" @click="filterDatas">确认</el-button>
+                    <router-link to="/admin/LT-YXSJWH-TJMZSM" style="margin:0 10px">
+                        <el-button size="mini" type="warning">添加</el-button>
+                    </router-link>
+                </el-form-item>
+            </el-form>
+        </crumbs>
+        <div class="contents">
+            <el-table :data="list"
+                      border
+                      style="width: 100%">
+                <el-table-column
+                        type="index"
+                        :index="indexMethod"
+                        label="编号"
+                        width="60">
+                </el-table-column>
+                <el-table-column
+                        prop="gmtCreate"
+                        label="操作时间"
+                        :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column
+                        prop="modifier"
+                        label="操作人">
+                </el-table-column>
+                <el-table-column
+                        prop="title"
+                        label="标题">
+                </el-table-column>
+                <el-table-column
+                        prop="disclaimerCode"
+                        label="归属">
+                </el-table-column>
+                <el-table-column
+                        label="状态">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" :class="{forbid:scope.row.status==0}" @click="toOpen(scope.row)">启用</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button type="text" size="small" :class="['delete',{'forbid':scope.row.status==1}]" @click="toClose(scope.row)">停用</el-button>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        label="操作">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" @click="toEditDiscl(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>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        label="详情">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" @click="getDetail(scope.row)">详情</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination v-if="total>pageSize"
+                           :current-page.sync="currentPage"
+                           @current-change="currentChange"
+                           background
+                           :page-size="pageSize"
+                           layout="total,prev, pager, next, jumper"
+                           :total="total">
+            </el-pagination>
+        </div>
+
+    </div>
+</template>
+
+<script>
+  import api from '@api/icss.js';
+  import utils from '@api/utils.js';
+
+  export default {
+    name: 'DisclaimerInformation',
+    data: function () {
+      return {
+        list: [],
+        cacheData: {},
+        currentPage: 1,
+        pageSize: 10,
+        total: 0,
+        linkIn:[],
+        pays:[],
+        filter: {
+          title: ''
+        }
+      }
+    },
+    created() {
+      this.getDataList();
+    },
+    methods: {
+      toEditDiscl(row){
+        this.$router.push({
+          name:'AddDisclInfo',
+          params: {info:row}
+        })
+      },
+      filterDatas(){
+        this.currentPage = 1;
+        this.getDataList();
+      },
+      getDataList() {
+        const param = this.getFilterItems();
+        api.discInformation(param).then((res) => {
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.list = data.records;
+            this.cacheData[param.current] = data.records;
+            this.total = data.total;
+          }
+        }).catch((error) => {
+          console.log(error);
+        });
+      },
+      getDetail(item) {
+        this.$router.push({name:'DiscInfoDetail', params:{info: item}})
+      },
+      getFilterItems() {
+        const param = {
+          title: this.filter.title,
+          current: this.currentPage,
+          size: this.pageSize
+        };
+        return param;
+      },
+      indexMethod(index) {
+        return ((this.currentPage - 1) * this.pageSize) + index + 1;
+      },
+      currentChange(next) {
+        this.currentPage = next;
+        if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+          this.list = this.cacheData[next];
+        } else {
+          this.getDataList();
+        }
+      },
+      warning(msg,type){
+        this.$message({
+          showClose: true,
+          message:msg,
+          type:type||'warning'
+        })
+      },
+      showConfirmDialog(msg,resolve){
+        this.$alert(msg, '提示', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+          resolve();
+        }).catch(() => {});
+      },
+      showDelDialog(id){
+        this.showConfirmDialog('是否删除该免责声明?',()=>{
+          api.delDiscInformation({id}).then((res)=>{
+            if(res.data.code=='0'){
+              this.warning(res.data.msg||'操作成功','success');
+              this.getDataList();
+            }else{
+              this.warning(res.data.msg);
+            }
+          }).catch((error)=>{
+            this.warning(error);
+          })
+        });
+      },
+      toOpen(item){
+        // status=0停用,status=1启用
+        if(item.status==0){
+          this.showConfirmDialog('是否启用该免责声明?',()=>{
+            api.openInformation({id:item.id}).then((res)=>{
+              if(res.data.code==0){
+                this.$message({
+                  type:'success',
+                  message:res.data.msg ||"启用成功"
+                })
+                this.getDataList();
+              }
+            }).catch((error)=>{
+              this.warning(error);
+            })
+          });
+        }
+      },
+      toClose(item){
+        if(item.status==1){
+          this.showConfirmDialog('是否停用该免责声明?',()=>{
+            api.closeInformation({id:item.id}).then((res)=>{
+              if(res.data.code==0){
+                this.$message({
+                  type:'success',
+                  message:res.data.msg ||"停用成功"
+                })
+                this.getDataList();
+              }
+            }).catch((error)=>{
+              this.warning(error);
+            })
+          });
+        }
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+    @import "../../less/admin.less";
+    .delete{
+      color: red !important;
+    }
+    .forbid{
+      color: #BFBFBF !important;
+    }
+</style>

+ 12 - 4
src/components/icss/IndeptLabel.vue

@@ -62,9 +62,16 @@
                     </template>
                 </el-table-column>
             </el-table>
-
+          <el-pagination v-if="total>pageSize"
+                        :current-page.sync="currentPage"
+                        @current-change="currentChange"
+                        background
+                        :page-size="pageSize"
+                        layout="total,prev, pager, next, jumper"
+                        :total="total">
+            </el-pagination>
         </div>
-        <div class="pagination">
+        <!-- <div class="pagination"> 
             <el-pagination v-if="total>pageSize"
                         :current-page.sync="currentPage"
                         @current-change="currentChange"
@@ -73,7 +80,7 @@
                         layout="total,prev, pager, next, jumper"
                         :total="total">
             </el-pagination>
-        </div>
+        </div> -->
         
     </div>
 </template>
@@ -227,8 +234,9 @@
 
 
 <style lang="less">
+  @import "../../less/admin.less";
     .delete{
-        color: red
+        color: red;
     }
     .delete:hover {
         color: red;

+ 14 - 3
src/components/icss/LabelGroup.vue

@@ -62,8 +62,6 @@
                     </template>
                 </el-table-column>
             </el-table>
-
-        </div>
         <div class="pagination">
             <el-pagination v-if="total>pageSize"
                        :current-page.sync="currentPage"
@@ -75,6 +73,18 @@
             </el-pagination>
         </div>
         
+        </div>
+       <!--  <div class="pagination">
+           <el-pagination v-if="total>pageSize"
+                      :current-page.sync="currentPage"
+                      @current-change="currentChange"
+                      background
+                      :page-size="pageSize"
+                      layout="total,prev, pager, next, jumper"
+                      :total="total">
+           </el-pagination>
+       </div> -->
+        
     </div>
 </template>
 
@@ -225,8 +235,9 @@ export default {
 
 
 <style lang="less">
+    @import "../../less/admin.less";
     .delete{
-       color: red
+       color: red;
     }
     .delete:hover {
         color: red;

+ 3 - 1
src/components/icss/NoiseTemplate.vue

@@ -3,7 +3,7 @@
     <div class="groupTitle"><i
         class="el-icon-back"
         @click="back"
-      ></i> 标签组维护--{{this.$route.params.isEdit ? '修改':'添加'}}标签组</div>
+      ></i> {{txt}}</div>
     <PubTagGroup
       :editData="editData"
       @changeVal="changeVal"
@@ -113,6 +113,7 @@ export default {
   name: 'NoiseTemplateWrapper',
   data() {
     return {
+      txt:'标签组维护--添加标签组',
       dataPub: {},      //公用组件传的值都在这
       editData:{},                    //编辑数据
       form: {
@@ -129,6 +130,7 @@ export default {
   beforeMount:function(){
     const {isEdit,data} = this.$route.params;
     if(isEdit){
+      this.txt = '标签组维护--修改标签组';
       this.editData = data;
       // console.log('回读数据', this.editData)
     }

+ 1 - 1
src/components/icss/PromptInfo.vue

@@ -52,7 +52,7 @@
                     <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" @click="showDelDialog(scope.row.id)">删除</el-button>
+                        <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row.id)">删除</el-button>
                     </template>
                 </el-table-column>
                 <el-table-column

+ 1 - 2
src/components/icss/PubTagGroup.vue

@@ -340,8 +340,7 @@ export default {
     validateSystomName(name,callback) {
       if(this.form.region3.trim() == ''){ return }
       let param = {
-        "existName": this.form.region3,
-        "tagType":this.form.region2.split(''),       
+        "existName": this.form.region3,     
         "type": this.form.region1,
         "notTagType":[8],        //去掉文字标签查重
       }

+ 3 - 8
src/components/icss/SimilarName.vue

@@ -232,21 +232,16 @@
   }
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
     @import "../../less/admin.less";
-    .status-span{
-        font-size: 12px;
-        margin-right:10px;
-        color: unset;
-    }
     .delete{
-        color: red
+        color: red;
     }
     .el-table .cell{
       overflow: hidden;
       white-space: nowrap;
     }
     #upFile{
-      display: none;
+      display: none !important;
     }
 </style>

+ 3 - 0
src/less/admin.less

@@ -160,4 +160,7 @@
 .el-message {
   top: 10%;
   transform: translateY(-50%, -50%, 0);
+}
+.el-pagination{
+  min-width: 980px;
 }

+ 7 - 0
src/routes.js

@@ -43,6 +43,9 @@ import AddSimilarName from '@components/icss/AddSimilarName.vue'//别名维护-
 import CommonSymptom from '@components/icss/CommonSymptom.vue' //常见科室症状
 import AddCommonSymptom from '@components/icss/AddCommonSymptom' //常见科室症状--添加
 
+import DisclaimerInformation from '@components/icss/DisclaimerInformation.vue'//免责声明
+import DiscInfoDetail from '@components/icss/DiscInfoDetail.vue'//免责声明-详情
+import AddDisclInfo from '@components/icss/AddDisclInfo.vue'//免责声明-添加
 export default [
   {
     path: '/',
@@ -153,6 +156,10 @@ export default [
       {path:'LT-YXSJWH-TJBM',component:AddSimilarName,name:'AddSimilarName'},     //别名维护-详情
       {path:'LT-YXSJWH-CJZZWH',component:CommonSymptom,name:'CommonSymptom'},  //常见症状维护
       {path:'LT-YXSJWH-TJCJZZ',component:AddCommonSymptom,name:'AddCommonSymptom'},  //常见症状维护--添加
+      {path:'LT-YXSJWH-TJBM',component:AddSimilarName,name:'AddSimilarName'},     //别名维护-添加/修改
+      {path:'LT-YXSJWH-MZSMWH',component:DisclaimerInformation,name:'DisclaimerInformation'},     //免责声明
+      {path:'LT-YXSJWH-MZSMXQ',component:DiscInfoDetail,name:'DiscInfoDetail'},     //免责声明-详情
+      {path:'LT-YXSJWH-TJMZSM',component:AddDisclInfo,name:'AddDisclInfo'},     //免责声明-添加/修改
     ]
   }
 ]