qymljy 2 kuukautta sitten
vanhempi
commit
0ee89e3cce

+ 141 - 0
src/HDrpManagement/serviceImprovement/components/causeAnalysis/edit.vue

@@ -0,0 +1,141 @@
+<template>
+  <div>
+    <el-button type="primary" size="small" @click="editClick">{{$t(`编辑真因分析`)}}</el-button>
+    <el-drawer
+        :title="$t(`编辑真因分析`)"
+        :visible.sync="drawerVisible"
+        :wrapperClosable="false"
+        size="40%"
+        direction="rtl"
+        append-to-body
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" :label-width="tool.onlyZh('90px')" label-position="top" size="mini">
+            <el-col :span="24">
+              <el-form-item :label="$t(`责任人`)+':'" prop="userid_charge">
+<!--                <el-input v-model="form.userid_charge" :placeholder="$t(`请选择责任人`)"></el-input>-->
+                <selectTemplate ref="selectRef" :params="params" type="组织架构" :params1="params1" placeholder="选择责任人" :data="data"></selectTemplate>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`责任部门`)+':'" prop="departmentid">
+                <el-input v-model="depname_charge" :placeholder="$t(`请选择责任部门`)" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`主要原因`)+':'" prop="main_reason">
+                <el-input v-model="form.main_reason"  type="textarea"
+                          :rows="5" :placeholder="$t(`主要原因`)"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`改善建议`)+':'" prop="suggestion">
+                <el-input v-model="form.suggestion"  type="textarea"
+                          :rows="5" :placeholder="$t(`改善建议`)"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="drawerVisible = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="primary" :loading="loading" @click="onSubmit" class="normal-btn-width">{{$t('确 定')}}</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import selectTemplate from '@/components/addTable/index'
+export default {
+  name: "edit",
+  props:['data'],
+  data(){
+    return {
+      drawerVisible:false,
+      loading:false,
+      form:{
+        "sa_service_improvementid": '',
+        "main_reason": "", //主要原因
+        "suggestion": "", //改善建议
+        "departmentid": '', //责任部门
+        "userid_charge": '' //责任人
+      },
+      depname_charge:'',
+      rules:{
+        userid_charge:[
+          { required: true, message: this.$t('请选择责任人'), trigger: 'change'},
+        ],
+        departmentid:[
+          { required: true, message: this.$t('请选择责任部门'), trigger: 'change'},
+        ],
+        main_reason:[
+          { required: true, message: this.$t('请填写主要原因'), trigger: 'blur'},
+        ],
+        suggestion:[
+          { required: true, message: this.$t('请填写改善建议'), trigger: 'blur'},
+        ],
+      },
+      params:{
+        id:20221102090303,
+        content:{
+          containssub:1,
+          isExport:0,
+          pageNumber:1,
+          pageSize:50,
+          departmentids:[],
+          where:{
+            condition:''
+          }
+        }
+      },
+      params1:{
+        classname: "webmanage.department.department",
+        method: "querydepartment",
+        content:{}
+      }
+    }
+  },
+  components:{selectTemplate},
+  methods:{
+    editClick(){
+      console.log(this.data,'data数据')
+      this.form = {
+        "sa_service_improvementid": this.$route.query.id,
+        "main_reason": this.data.main_reason, //主要原因
+        "suggestion": this.data.suggestion, //改善建议
+        "departmentid": this.data.departmentid == 0 ?'':this.data.departmentid, //责任部门
+        "userid_charge": this.data.userid_charge == 0 ? '' : this.data.userid_charge //责任人
+      }
+      this.depname_charge = this.data.depname_charge
+      console.log(this.form,'信息数据输出')
+      this.drawerVisible = true
+      this.$nextTick(()=>{
+        this.$refs.selectRef.input = this.data.name_charge
+      })
+    },
+    onSubmit(){
+      console.log(this.form,'form表单数据')
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        this.$store.commit('setLoading',true)
+        const res = await this.$api.requested({
+          "id": 2026020209494502,
+          "content": this.form,
+        })
+        this.tool.showMessage(res,()=>{
+          this.$store.commit('setLoading',false)
+          this.$emit('editSuccess')
+        })
+      })
+    },
+    onClose(){
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 36 - 0
src/HDrpManagement/serviceImprovement/components/causeAnalysis/fileItem.vue


+ 76 - 0
src/HDrpManagement/serviceImprovement/components/causeAnalysis/index.vue

@@ -0,0 +1,76 @@
+<template>
+  <div>
+    <edit :data="mainData" @editSuccess="editSuccess" v-if="mainData.status == '新建' && mainData.userid_analysis == userid"></edit>
+    <div class="div_title">{{$t(`主要原因`)}}</div>
+    <div class="div-content">
+      {{mainData.main_reason || '暂无数据'}}
+    </div>
+    <div class="div_title">{{$t(`改善建议`)}}</div>
+    <div class="div-content">
+      {{mainData.suggestion || '暂无数据'}}
+    </div>
+    <div class="div_title">{{$t(`附件`)}}</div>
+    <div v-if="attinfos.length > 0">
+      <file-item
+          :marginRight="21"
+          :margin-top="10"
+          :rowCount="5"
+          :isDownLoad="false"
+          :fileData="attinfos"
+          :isDelete="false"
+          >
+      </file-item>
+    </div>
+    <div v-else style="margin-top: 10px">{{$t(`暂无数据`)}}</div>
+  </div>
+</template>
+
+<script>
+import edit from './edit'
+import previewImage from '@/components/previewImage/index.vue'
+import FileItem from './fileItem'
+export default {
+  name: "index",
+  props:['mainData'],
+  components:{edit,previewImage,FileItem},
+  data(){
+    return {
+      attinfos:[],
+      userid:JSON.parse(sessionStorage.getItem('active_account')).userid,
+    }
+  },
+  methods:{
+    async queryFile(){
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "queryFileLink",
+        "content": {
+          "ownertable": "sa_service_improvement",
+          "ownerid": this.$route.query.id,
+          "usetype":"analysis"//传空返回有所
+        }
+      })
+      console.log(res,'输出附件信息')
+      this.attinfos = res.data
+    },
+    editSuccess(){
+      this.$emit('editSuccess')
+    }
+  },
+  mounted() {
+    this.queryFile()
+  }
+}
+</script>
+
+<style scoped>
+.div_title{
+  font-weight: bold;
+  font-size: 16px;
+  margin-top: 20px;
+}
+.div-content{
+  margin-top: 10px;
+  font-size: 14px;
+}
+</style>

+ 8 - 2
src/HDrpManagement/serviceImprovement/components/serviceImprovement/index.vue

@@ -1,7 +1,9 @@
 <template>
   <div>
     <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane label="真因分析" name="真因分析">{{$t(`真因分析`)}}</el-tab-pane>
+      <el-tab-pane label="真因分析" name="真因分析">
+        <causeAnalysis :mainData="mainData" @editSuccess="editSuccess"></causeAnalysis>
+      </el-tab-pane>
       <el-tab-pane label="改善方案" name="改善方案">{{$t(`改善方案`)}}</el-tab-pane>
       <el-tab-pane label="方案执行" name="方案执行">{{$t(`方案执行`)}}</el-tab-pane>
       <el-tab-pane label="影响产品范围" name="影响产品范围">
@@ -21,10 +23,11 @@
 import detailInfo from '@/components/detailInfo/index'
 import associatedImprovementOrder from '../associatedImprovementOrder/index'
 import affectedProductScope from '../affectedProductScope/index'
+import causeAnalysis from '../causeAnalysis/index'
 export default {
   name: "index",
   props:['mainData','someUserid'],
-  components:{detailInfo,associatedImprovementOrder,affectedProductScope},
+  components:{detailInfo,associatedImprovementOrder,affectedProductScope,causeAnalysis},
   data(){
     return {
       activeName:'真因分析',
@@ -81,6 +84,9 @@ export default {
           ]
         }
       ]
+    },
+    editSuccess(){
+      this.$emit('Success')
     }
   }
 }

+ 3 - 3
src/HDrpManagement/serviceImprovement/modules/detail.vue

@@ -78,7 +78,7 @@
       </div>
       <div slot="slot0" >
         <div v-if="!tool.checkAuth($route.name,'linkedApplication') && !tool.checkAuth($route.name,'linkedTicket')">
-          <serviceImprovement :mainData="mainData" :someUserid="someUserid"></serviceImprovement>
+          <serviceImprovement :mainData="mainData" :someUserid="someUserid" @Success="queryMainData"></serviceImprovement>
         </div>
         <div v-if="tool.checkAuth($route.name,'linkedApplication')">
           <serviceApplication  ref="serviceApplicationRef" v-if="mainData" :mainData="mainData" :new-query="true"></serviceApplication>
@@ -94,11 +94,11 @@
                             :team_name="team_name" :team_phone_number="team_phone_number" :new-query="true"></serviceWorkOrder>
         </div>
         <div v-else>
-          <serviceImprovement :mainData="mainData" :someUserid="someUserid"></serviceImprovement>
+          <serviceImprovement :mainData="mainData" :someUserid="someUserid" @Success="queryMainData"></serviceImprovement>
         </div>
       </div>
       <div slot="slot2" >
-        <serviceImprovement :mainData="mainData" :someUserid="someUserid"></serviceImprovement>
+        <serviceImprovement :mainData="mainData" :someUserid="someUserid" @Success="queryMainData"></serviceImprovement>
       </div>
     </basicDetails>
   </div>

+ 1 - 1
src/SManagement/orderclue/components/file/index2.vue

@@ -35,7 +35,7 @@
         <i class="el-icon-delete" style="font-size:16px" @click="deleteFile(item,index)" v-if="isDelete"></i>
       </div>
     </div>
-    <see-File ref="seeFile" :fileData="seeFile"></see-File>
+    <SeeFile ref="seeFile" :fileData="seeFile"></SeeFile>
   </div>
 </template>
 

+ 101 - 0
src/components/addTable/index.vue

@@ -0,0 +1,101 @@
+<template>
+  <div>
+    <el-popover
+        placement="left"
+        width="100%"
+        trigger="focus"
+        v-model="drawerVisible">
+      <div>
+        <div class="flex-align-center flex-between" style="margin-bottom:10px">
+          <el-input  style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="params.content.where.condition?params.content.where.condition.length > 0?'':'':'el-icon-search'"
+                     v-model="params.content.where.condition" @keyup.native.enter="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)"
+                     size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          </el-input>
+        </div>
+        <table-detail :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght" minHeight="200px" fixedName="operation">
+          <template v-slot:customcol="scope">
+            <div>
+              {{scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation'?scope.column.data[[scope.column.columnname]]:'--'}}
+            </div>
+          </template>
+        </table-detail>
+        <div  class="container normal-panel" style="text-align:right;padding-bottom: 0!important;">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[50, 100, 150, 200]"
+              :page-size="50"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+      </div>
+      <div slot="reference">
+        <el-input readonly :validate-event="false" v-model="input"  @focus="drawerShow" :placeholder="$t(placeholder)" clearable></el-input>
+      </div>
+    </el-popover>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:['params','params1','type','placeholder','data'],
+  data(){
+    return {
+      drawerVisible:false,
+      input:'',
+      tableHieght:'calc(100vh - 380px)',
+      tablecols:[],
+      list:[],
+      currentPage:0,
+      total:0,
+    }
+  },
+  methods:{
+    drawerShow(){
+      this.drawerVisible = true
+      if (this.type == '组织架构'){
+        console.log(this.data,'data数据')
+        this.input = this.data.name_charge
+        this.depData()
+      }
+    },
+    async depData(){
+      const res = await this.$api.requested(this.params1)
+      if (res.code == 0){
+        this.tool.showMessage(res,()=>{})
+      }else {
+        this.params.content.departmentids = [res.data[0].departmentid]
+        this.listData()
+      }
+    },
+    async listData(){
+      const res = await this.$api.requested(this.params)
+      this.list = res.data
+      this.currentPage = res.pageNumber
+      this.total = res.total
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+      this.listData()
+    },
+    onClose(){}
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).assigneeTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 1
src/components/normal-basic-layout/details/modules/followUp/followUp.vue

@@ -96,7 +96,8 @@
             <div class="flex-align-center flex-between pionter" v-for="img in i.attinfos" :key="img.index" style="padding:10px;margin-bottom:5px;border: 1px solid #ccc">
               <div class="flex-align-center" style="flex:1;width:90%;">
                 <previewImage
-                    v-if="img.postfix == 'jpg' || img.postfix == 'JPG' || img.postfix == 'jpge' || img.postfix == 'JPGE' || img.postfix == 'pnd' || img.postfix == 'PND' || img.postfix == 'svg' || img.postfix == 'SVG'"
+                    v-if="img.postfix == 'jpg' || img.postfix == 'JPG' || img.postfix == 'jpge' || img.postfix == 'JPGE' || img.postfix == 'pnd'
+                    || img.postfix == 'PND' || img.postfix == 'png' || img.postfix == 'PNG' || img.postfix == 'svg' || img.postfix == 'SVG'"
                     style="width:50px;height:50px;margin:0px"
                     :image="img"
                     :deletebtn="false"

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä