Parcourir la source

Merge branch 'dev' into dev2/luolei

Luolei il y a 6 ans
Parent
commit
370bfc071e

+ 6 - 0
src/api/config.js

@@ -106,6 +106,12 @@ export default {
     'addSimilarName': 'api/icssman/retrieval/addTagRetrieval', //别名维护-添加、修改
     'searchLable': 'api/icssman/questionInfo/index', //标签检索
     'uploadFile': 'api/icssman/retrieval/retrievalExcelIm', //别名维护-导入
+    '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', //免责声明-启用
     'updateModuleInfo': 'api/icssman/moduleInfo/updateModuleInfo', //模板维护系统修改保存
     'getModuleInfoList': 'api/icssman/moduleInfo/getModuleInfoList', //模板维护系统列表
     'getModuleInfoOne': 'api/icssman/moduleInfo/getModuleInfoOne', //模板维护系统修改获取单个模板信息

+ 18 - 0
src/api/icss.js

@@ -93,6 +93,24 @@ export default {
     uploadFile(param) {//别名维护-导入
         return axios.post(urls.uploadFile, 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)
+    },
     updateModuleInfo(param) {//模板维护系统修改保存
         return axios.post(urls.updateModuleInfo, 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>

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

@@ -71,7 +71,8 @@
         config:{
           initialFrameWidth: null,
           initialFrameHeight: 350,
-          serverUrl: 'http://192.168.2.236:5050/api/icssman/file/uploadImage',
+          imageUrlPrefix:"http://192.168.2.236:82",
+          serverUrl: '/api/icssman/file/uploadImage',
           UEDITOR_HOME_URL: '/UEditor/',        //静态文件路径
           toolbars:[['source','undo','redo','bold','italic','underline','fontborder','strikethrough','superscript','subscript','removeformat','formatmatch','autotypeset','blockquote',
             'pasteplain','forecolor','backcolor','insertorderedlist','insertunorderedlist','selectall',

+ 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;

+ 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

+ 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;
 }

+ 8 - 0
src/routes.js

@@ -40,6 +40,9 @@ import PromptInfo from '@components/icss/PromptInfo.vue'//提示信息
 import AddPromptInfo from '@components/icss/AddPromptInfo.vue'//添加提示信息
 import SimilarName from '@components/icss/SimilarName.vue'//别名维护
 import AddSimilarName from '@components/icss/AddSimilarName.vue'//别名维护-详情
+import DisclaimerInformation from '@components/icss/DisclaimerInformation.vue'//免责声明
+import DiscInfoDetail from '@components/icss/DiscInfoDetail.vue'//免责声明-详情
+import AddDisclInfo from '@components/icss/AddDisclInfo.vue'//免责声明-添加
 import TemplateMaintenance from '@components/icss/TemplateMaintenance.vue'//模板维护列表
 import TemplateMaintenanceWrap from '@components/icss/TemplateMaintenanceWrap.vue'//模板维护添加修改
 export default [
@@ -148,6 +151,11 @@ export default [
       {path:'LT-YXSJWH-TJDLBQ',component:AddIndeptLabel,name:'AddIndeptLabel'},     //独立标签维护--添加
       {path:'LT-YXSJWH-TSXXWH',component:PromptInfo,name:'PromptInfo'},         //提示信息维护
       {path:'LT-YXSJWH-TJTSXX',component:AddPromptInfo,name:'AddPromptInfo'},         //提示信息维护
+	    {path:'LT-YXSJWH-BMWH',component:SimilarName,name:'SimilarName'},     //别名维护
+      {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'},     //免责声明-添加/修改
 	  {path:'LT-YXSJWH-BMWH',component:SimilarName,name:'SimilarName'},     //别名维护
       {path:'LT-YXSJWH-TJBM',component:AddSimilarName,name:'AddSimilarName'},     //别名维护-详情
       {path:'LT-YXSJWH-MBWH',component:TemplateMaintenance,name:'TemplateMaintenance'},     //模板维护