|
@@ -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>
|