Browse Source

好差评整改增加审核功能

psj 2 years ago
parent
commit
b8216370d4

+ 4 - 2
src/components/handle-static/HandleStatic.vue

@@ -40,8 +40,10 @@ export default {
       }
     }).then(response => {
       var dataArr = response.data.msg[0].Rows;
-      console.log(dataArr)
-      for(var i=0;i<10;i++){
+      for(var i=0;i<dataArr.length;i++){
+        if(i > 9){
+          break;
+        }
         this.HandleStaticDataX.push(dataArr[i].NAME.length>8?dataArr[i].NAME.substr(0,8)+"...":dataArr[i].NAME);
         this.HandleStaticDataXTotal.push(dataArr[i].NAME);
         this.HandleStaticDataY.push(dataArr[i].DATA_COUNT);

+ 4 - 0
src/components/total-handle/TotalHandle.vue

@@ -125,6 +125,10 @@ export default {
     this.timer = setInterval(this.updatetransferqk, 15000);
     this.remindSearch();
   },
+  destroyed(){
+    // 在页面销毁后,清除计时器
+    clearInterval(this.timer);
+  },
   methods:{
     remindSearch(){
       this.$request({

+ 1 - 1
src/echarts/option.js

@@ -62,7 +62,7 @@ export function setEventStaOption(ele,trafficWay){
                 },
             },
             {
-                value: 8,
+                value: -1,
                 name: '',
                 itemStyle: {
                     normal: {

+ 5 - 2
src/views/evaluate/EventHandleSituation.vue

@@ -98,7 +98,9 @@
 <!--                  size="mini"-->
 <!--                  @click="showDialog(scope.row.COOPERATION_DEPARTMENT,scope.row.NAME)">指南-->
 <!--              </span>-->
-            <el-link class="mr-link" v-if="!scope.row.hasChildren" type="primary" @click="openFileModel(scope.row,'changePlan')">填报</el-link>
+              <el-link class="mr-link" v-if="!scope.row.hasChildren"  type="primary" @click="openFileModel(scope.row,'changePlan')">查看</el-link>
+            <el-link class="mr-link" v-if="huifuState=='173'&&(scope.row.EXAMINE_STATE==undefined || scope.row.EXAMINE_STATE !='0')&&!scope.row.hasChildren" type="primary" @click="openFileModel(scope.row,'changePlan')">填报</el-link>
+              <el-link class="mr-link" v-if="huifuState=='174'&&scope.row.EXAMINE_STATE=='0'&&!scope.row.hasChildren" type="primary" @click="openFileModel(scope.row,'changePlan')">审核</el-link>
           </template>
         </el-table-column>
       </el-table>
@@ -145,7 +147,7 @@ export default {
       isEditModelShow:false,
       isOperationModelShow:false,
       isPlanModelShow:false,
-
+        huifuState:'',
       detailSituationCode:'',
       detailMatterCode:''
     }
@@ -203,6 +205,7 @@ export default {
       this.commit();
     },
     commit(){
+        this.huifuState = localStorage.getItem('ywtb_role');
       this.$request({
         url:'/ywtb/selectYwtbEvaluateZgqkMatterPageList',
         method:'post',

+ 79 - 1
src/views/evaluate/c-cpns/EvaluateRepeatModel.vue

@@ -45,6 +45,14 @@
             <el-button type="primary" size="small">屏蔽文字</el-button>
             <el-button type="primary" size="small">撤销屏蔽</el-button>
           </div>
+          <div class="evaluate_img" v-for="(item,index) in evaluate_img" :key="index">
+            <el-image
+                    style="width: 80px; height: 80px;margin: 10px 5px 0px 0px;"
+                    :src="item.PICTURE_PATH"
+                    :preview-src-list="srcList">
+            </el-image>
+            <el-checkbox  class="checkbox" v-model="item.STATE" @change="evaluatChange(item.MARK_UUID)" ></el-checkbox>
+          </div>
         </div>
         <div v-if="operationType === 'find' || operationType === 'exam'" class="block-info">
           <div class="cate-title">
@@ -120,6 +128,10 @@ export default {
   name: "EvaluateRepeatModel",
   data(){
    return {
+     evaluate_img:[
+     ],
+     srcList: [
+     ],
      loading:false,
      dialogFormTop:'12vh',
      baseInfo:[
@@ -293,6 +305,62 @@ export default {
     }
   },
   methods:{
+    evaluatChange(MARK_UUID){//循环
+      for(var i = 0 ; i < this.evaluate_img.length;i++){
+        if(MARK_UUID == this.evaluate_img[i]["MARK_UUID"]){
+          this.editYwtbEvaluatePicture(MARK_UUID,this.evaluate_img[i]["STATE"]);
+          break;
+        }
+      }
+    },
+    selectYwtbEvaluatePicture(){
+      this.$request({
+        url:'/ywtb/selectYwtbEvaluatePicture',
+        method:'post',
+        data:{
+          'EVALUATE_UUID':this.currentData.MARK_UUID
+        }
+      }).then(response => {
+        let dataArr = response.data.msg[0].Rows
+        if(dataArr.length > 0){
+          this.srcList = [];
+          for(let i=0;i<dataArr.length;i++){
+            this.srcList.push(dataArr[i]["PICTURE_PATH"]);
+            if(dataArr[i]["STATE"] == "1"){
+              dataArr[i]["STATE"] = true;
+            }else{
+              dataArr[i]["STATE"] = false;
+            }
+          }
+          this.evaluate_img =dataArr;
+        }else{
+          this.srcList = [];
+          this.evaluate_img = [];
+        }
+      })
+    },
+    editYwtbEvaluatePicture(MARK_UUID,STATE){
+      this.$request({
+        url:'/ywtb/editYwtbEvaluatePicture',
+        method:'post',
+        data:{
+          "MARK_UUID":MARK_UUID,
+          "STATE":STATE == true ? 1 : 0
+        }
+      }).then(response => {
+        let dataArr = response.data.msg[0].success;
+        if(dataArr=='true'){
+          MessageBox.alert('操作成功', '提示', {
+            confirmButtonText: '确定'
+          });
+        }else{
+          this.loading=false;
+          MessageBox.alert('操作失败', '提示', {
+            confirmButtonText: '确定'
+          });
+        }
+      })
+    },
     showData(){
       let DataList = ["baseInfo","evaluateInfo","repeatInfo","examInfo"];
       for(let i =0;i<DataList.length;i++){
@@ -317,6 +385,7 @@ export default {
           }
         }
       }
+      this.selectYwtbEvaluatePicture();
     },
     saveRepeatInfo(){
       this.loading=true;
@@ -402,6 +471,15 @@ export default {
 </script>
 
 <style scoped lang="scss">
+  .evaluate_img{
+    display: inline-block;
+    position:relative;
+  }
+  .evaluate_img .checkbox{
+    position: absolute;
+    top:10px;
+    left:5px;
+  }
 
 .el-dialog__wrapper{
   overflow: hidden;
@@ -432,7 +510,7 @@ export default {
   }
 }
 .dialog_content{
-  height: 650px;
+/*  height: 650px;*/
   width: 100%;
   display: flex;
   flex-wrap: wrap;

+ 140 - 22
src/views/evaluate/c-cpns/EventHandleFileModel.vue

@@ -53,9 +53,9 @@
               </div>
               <el-form class="one_part_first" size="small" :model="formData" :rules="rules" label-width="100px">
                 <el-form-item label="整改计划:">
-                  <el-input type="textarea" :rows="4" v-model="formData.plan"></el-input>
+                  <el-input type="textarea" :rows="4" v-model="formData.plan" :readonly="huifuState!='173'"></el-input>
                 </el-form-item>
-                <el-form-item label="上传文件:">
+                <el-form-item v-show="huifuState == '173' && (this.formData.EXAMINE_STATE==undefined || this.formData.EXAMINE_STATE == '2')" label="上传文件:">
                   <el-upload
                       class="upload-demo"
                       ref="upload"
@@ -70,12 +70,33 @@
                     <div slot="tip" class="el-upload__tip">支持扩展名:.rar,.zip,.doc,.docx,.pdf,.jpg...</div>
                   </el-upload>
                 </el-form-item>
-
+                <div v-if="this.formData.EXAMINE_STATE!=undefined" class="single_count_reasons">
+                  <span>附件:</span>
+                  <span class="showOldAppendix">{{formData.appendix}}</span>
+                </div>
+                <el-form-item v-if="this.formData.EXAMINE_STATE!=undefined" label="审核意见:">
+                  <el-input type="textarea" :rows="4" v-model="formData.EXAMINE_OPINION" :readonly="huifuState!='174' || this.formData.EXAMINE_STATE!='0'"></el-input>
+                </el-form-item>
+                <div class="single_count" v-if="this.formData.EXAMINE_STATE!=undefined">
+                  <div class="one_part">
+                    <span>审核人:</span>
+                    <span class="showOldPlan">{{ formData.EXAMINE_NAME }}</span>
+                  </div>
+                  <div  class="one_part">
+                    <span>审核时间:</span>
+                    <span class="showOldPlan">{{ formData.EXAMINE_DATE }}</span>
+                  </div>
+                  <div  class="one_part">
+                    <span>审核状态:</span>
+                    <span class="showOldPlan">{{ formData.EXAMINE_STATE == '1' ? '通过' : formData.EXAMINE_STATE == '2'?'未通过':'未审核' }}</span>
+                  </div>
+                </div>
               </el-form>
               <div class="endButton">
-                <el-button size="small"  type="primary" @click="submitUpload">保存</el-button>
+                <el-button size="small" v-if="huifuState=='173'&&(this.formData.EXAMINE_STATE=='2' || this.formData.EXAMINE_STATE==undefined)"  type="primary" @click="submitUpload(0)">保存</el-button>
+                <el-button size="small" v-if="huifuState=='174'&&this.formData.EXAMINE_STATE=='0'"  type="primary" @click="submitUpload(1)">审核通过</el-button>
+                <el-button size="small" v-if="huifuState=='174'&&this.formData.EXAMINE_STATE=='0'" type="primary" @click="submitUpload(2)">审核不通过</el-button>
                 <el-button size="small" type="primary"  @click="closeDialog">关闭</el-button>
-
               </div>
             </el-card>
           </el-timeline-item>
@@ -114,8 +135,26 @@
                   <span>附件:</span>
                   <span class="showOldAppendix">{{item.appendix}}</span>
                   </div>
+                  <div  class="one_part">
+                    <span>审核意见:</span>
+                    <span class="showOldPlan">{{item.EXAMINE_OPINION}}</span>
+                  </div>
 
                 </div>
+                <div class="single_count" v-if="item.EXAMINE_STATE!=undefined">
+                  <div class="one_part">
+                    <span>审核人:</span>
+                    <span class="showOldPlan">{{ item.EXAMINE_NAME }}</span>
+                  </div>
+                  <div  class="one_part">
+                    <span>审核时间:</span>
+                    <span class="showOldPlan">{{ item.EXAMINE_DATE }}</span>
+                  </div>
+                  <div  class="one_part">
+                    <span>审核状态:</span>
+                    <span class="showOldPlan">{{ item.EXAMINE_STATE == '1' ? '通过' : item.EXAMINE_STATE == '2'?'未通过':'未审核' }}</span>
+                  </div>
+                </div>
               </div>
             </el-card>
           </el-timeline-item>
@@ -129,12 +168,14 @@
 </template>
 
 <script>
+  import {getCurrentTime} from "@/commomUse";
 import { isBadChangeArr,badChangeTableHeader
 } from "@/views/units/local-data";
 import ElePagination from "@/components/ele-paga/ElePagination";
 import TabControl from "@/components/common-panel/c-cpns/TabControl";
 import MyTable from "@/components/my-table/MyTable";
 import {MessageBox} from "element-ui";
+
 export default {
   name: "EventHandleFileModel",
   components: {TabControl, ElePagination, MyTable},
@@ -162,7 +203,9 @@ export default {
     return {
 
       loading: false,
+      huifuState:'',
       matter:'',
+      examines_state:'',
       situation:'',
       dialogFormTop:'12vh',
       // formData:{
@@ -210,7 +253,13 @@ export default {
       pageSize:10,
       currentTableHeader:'',
       formData: {
-        plan:''
+        plan:'',
+        MARK_UUID:'',
+        EXAMINE_STATE:'',
+        EXAMINE_OPINION:'',
+        EXAMINE_DATE:'',
+        EXAMINE_NAME:'',
+        appendix:''
       },
       rules:[
 
@@ -235,6 +284,7 @@ export default {
   },
   mounted() {
     this.currentBadChangeId = "commitSituation";
+    this.huifuState = localStorage.getItem('ywtb_role');
   },
 
   methods:{
@@ -257,7 +307,10 @@ export default {
       this.$refs.upload.clearFiles();
       this.$emit('update:dialogVisible',false)
     },
-      submitUpload() {
+      submitUpload(state) {
+      //审核状态
+      this.examines_state = state;
+
       if(this.$refs.upload.uploadFiles==undefined||this.$refs.upload.uploadFiles.length ==0){
         this.submitCommit('');
       }else{
@@ -302,26 +355,61 @@ export default {
         return extension || extension2 || extension3 || extension4 && isLt2M
       },
     submitCommit(path){
+      var json_data = {
+        "MATTER_CODE":'1',
+        "SITUATION_CODE":this.situation,
+        "ENCLOSURE":path,
+        'RECTIFICATION_PLAN':this.formData.plan,
+        'OPERATION_TIME1':'2022-01-01',
+        'UNIT_CODE':'AH0001',
+        "appkey":localStorage.getItem("ywtb_userkeycode")
+      };
+      //判断当前是是否为审核
+      if(this.examines_state >= 0){
+        json_data = {};
+        json_data["appkey"] = localStorage.getItem("ywtb_userkeycode");
+        json_data["EXAMINE_STATE"] = this.examines_state;
+        json_data["EXAMINE_OPINION"] = this.formData.EXAMINE_OPINION;
+        json_data["RECTIFICATION_PLAN"] = this.formData.plan;
+        json_data["SITUATION_CODE"] = this.situation;
+        json_data["ENCLOSURE"] = path;
+        json_data["MARK_UUID"] = this.formData.MARK_UUID;
+
+        if(this.huifuState == '174'){
+          //审核时间
+          json_data["EXAMINE_DATE"] = getCurrentTime();
+          json_data["EXAMINE_CODE"] = localStorage.getItem("ywtb_usercode");
+          json_data["EXAMINE_NAME"] = localStorage.getItem("ywtb_username");
+        }
+        if(this.examines_state > 0){
+          json_data["ENCLOSURE"] = '';
+        }
+        if(this.huifuState == '174' && (json_data["EXAMINE_OPINION"] == '' || json_data["EXAMINE_OPINION"] == undefined)){
+          MessageBox.alert('请填写审核意见', '提示', {
+            confirmButtonText: '确定'
+          });
+          return;
+        }
+
+      }
       this.$request({
         url:'/ywtb/editYwtbRectification',
         method:'post',
-        data:{
-          "MATTER_CODE":'1',
-          "SITUATION_CODE":this.situation,
-          "ENCLOSURE":path,
-          'RECTIFICATION_PLAN':this.formData.plan,
-          'OPERATION_TIME1':'2022-01-01',
-          'UNIT_CODE':'AH0001',
-          "appkey":localStorage.getItem("ywtb_userkeycode")
-        }
+        data:json_data
       }).then(response => {
         let dataArr = response.data.msg[0].success;
         if(dataArr=='true'){
-          console.log(dataArr);
           this.loading=false;
-          MessageBox.alert('上传整改计划成功', '提示', {
-            confirmButtonText: '确定'
-          });
+          if(this.huifuState == '174'){
+            MessageBox.alert('审核成功', '提示', {
+              confirmButtonText: '确定'
+            });
+          }else{
+            MessageBox.alert('上传整改计划成功', '提示', {
+              confirmButtonText: '确定'
+            });
+          }
+
           this.closeDialog();
         }
       })
@@ -405,13 +493,39 @@ export default {
         this.loading=false;
         let useData= []
         let dataArr = response.data.msg[0].Rows;
+        if(this.huifuState != "173" || (dataArr[1] != null && dataArr[1]["EXAMINE_STATE"] != '1')){
+          dataArr = [];
+          for(var i = 0 ;i <  response.data.msg[0].Rows.length;i++){
+            if(i==0){
+              continue;
+            }
+            dataArr.push(response.data.msg[0].Rows[i]);
+          }
+        }
         dataArr[0].START_TIME =dataArr[0].START_TIME.length > 16 ?dataArr[0].START_TIME =dataArr[0].START_TIME.substring(0,16):dataArr[0].START_TIME
         dataArr[0].END_TIME =dataArr[0].END_TIME.length > 16 ?dataArr[0].END_TIME =dataArr[0].END_TIME.substring(0,16):dataArr[0].END_TIME
         this.insertTime= dataArr[0].START_TIME +'---'+dataArr[0].END_TIME;  //开始时间
         this.commitCount=dataArr[0].EVALUATE_ALL_NUM;//评价总数
         this.badCommitCount=dataArr[0].EVALUATE_CP_NUM;  //差评数
         this.badCommitInterest=dataArr[0].EVALUATE_CPL; //差评率
-        this.ReasonList = this.setReasonList(dataArr[0].REASON)
+        this.ReasonList = this.setReasonList(dataArr[0].REASON);
+
+
+        this.formData.appendix=dataArr[0].ENCLOSURE!==undefined?dataArr[0].ENCLOSURE.substr(dataArr[0].ENCLOSURE.lastIndexOf('/')):'';  //附件
+        this.formData.EXAMINE_STATE = dataArr[0].EXAMINE_STATE;
+        this.formData.MARK_UUID = dataArr[0].MARK_UUID;
+        this.formData.EXAMINE_OPINION = dataArr[0].EXAMINE_OPINION;
+        this.formData.plan = dataArr[0].RECTIFICATION_PLAN;
+        this.formData.EXAMINE_NAME = dataArr[0].EXAMINE_NAME;
+        this.formData.EXAMINE_DATE = dataArr[0].EXAMINE_DATE;
+        if(this.formData.EXAMINE_DATE != null){
+          this.formData.EXAMINE_DATE = this.formData.EXAMINE_DATE.toString().substr(0,16)
+        }
+        //判断当前数据 是否需要审核
+        if(dataArr[0].EXAMINE_STATE == "0"){
+          this.formData.MARK_UUID = dataArr[0].MARK_UUID;
+        }
+
         if(dataArr.length >1){
           for(let i=1;i<dataArr.length;i++){
             dataArr[i].START_TIME =dataArr[i].START_TIME.length > 16 ?dataArr[i].START_TIME =dataArr[i].START_TIME.substring(0,16):dataArr[i].START_TIME
@@ -425,7 +539,11 @@ export default {
               badCommitInterest:dataArr[i].EVALUATE_CPL,  //差评率
               appendix: dataArr[i].ENCLOSURE!==undefined?dataArr[i].ENCLOSURE.substr(dataArr[i].ENCLOSURE.lastIndexOf('/')):'',   //附件
               changeContent:dataArr[i].RECTIFICATION_PLAN,  //整改内容
-              reasonList:this.setReasonList(dataArr[i].REASON)
+              reasonList:this.setReasonList(dataArr[i].REASON),
+              EXAMINE_NAME:dataArr[i].EXAMINE_NAME,  //
+              EXAMINE_DATE:dataArr[i].EXAMINE_DATE == null ? '' : dataArr[i].EXAMINE_DATE.toString().substr(0,16),  //整改内容
+              EXAMINE_STATE:dataArr[i].EXAMINE_STATE,  //
+              EXAMINE_OPINION:dataArr[i].EXAMINE_OPINION
             }
             useData.push(tempdata);
           }

+ 2 - 2
src/views/matters_guidance/mian_body/MainBody.vue

@@ -44,8 +44,8 @@
                 <el-button type="primary" class="role_button" role_button_code="8f55b710-6f34-4722-9666-582f8f04ad01" @click="onSubmitSearch">查询</el-button>
                 <el-button class="role_button" role_button_code="4a2fbabd-45db-4408-8268-b3dbd5617b2a" type="primary" @click="downloadModel()">导入模板</el-button>
                 <el-upload  style="display: inline-block;margin-left:8px"
-                           class="upload-demo"
-                           action="http://10.81.66.9:9250/ywtb/ywtbMatter_upload"
+                           class="upload-demo role_button" role_button_code="df9dcabf-872c-486c-a7a7-a82b8d3d5f55"
+                            action="http://10.81.66.9:9250/ywtb/ywtbMatter_upload"
                            :show-file-list="showList"
                            :onError="uploadError"
                            :onSuccess="uploadSuccess"