yxk_pc_mdh/gyhl/static/js/113.89709b9694a2dcc0ed21.js

1 line
13 KiB
JavaScript

webpackJsonp([113],{DKSx:function(e,t){},OR2w:function(e,t){},Rztb:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray__=__webpack_require__("d7EF"),__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray__),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise__=__webpack_require__("//Fk"),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise__),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_assign__=__webpack_require__("woOf"),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_assign___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_assign__),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__=__webpack_require__("Dd8w"),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__),__WEBPACK_IMPORTED_MODULE_4__components_btnInput_vue__=__webpack_require__("ysqt"),__WEBPACK_IMPORTED_MODULE_5_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_6__components_System_tagMulitUsers__=__webpack_require__("HeHh"),__WEBPACK_IMPORTED_MODULE_7__components_System_dialogChooseSingleUser__=__webpack_require__("3MlD"),__WEBPACK_IMPORTED_MODULE_8__api_base_js__=__webpack_require__("Dod7"),__WEBPACK_IMPORTED_MODULE_9__utils_config_js__=__webpack_require__("bzuE"),__WEBPACK_IMPORTED_MODULE_10__utils_conversion_js__=__webpack_require__("Xnfr"),__WEBPACK_IMPORTED_MODULE_11_element_ui__=__webpack_require__("zL8q"),__WEBPACK_IMPORTED_MODULE_11_element_ui___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_element_ui__);__webpack_exports__.a={components:{btnInput:__WEBPACK_IMPORTED_MODULE_4__components_btnInput_vue__.a,SearchMulitUsers:__WEBPACK_IMPORTED_MODULE_6__components_System_tagMulitUsers__.a,DialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_7__components_System_dialogChooseSingleUser__.a},name:"task_redact",data:function(){return{fullscreenLoading:!1,auto_upload:!1,uploadUrl:__WEBPACK_IMPORTED_MODULE_8__api_base_js__.a.uploadUrl,ftpPrefix:__WEBPACK_IMPORTED_MODULE_8__api_base_js__.a.ftpPrefix,formData:{taglocationappearanceImage:[],deletetag_appearanceImage:[],initFileList:[],taskType:null,heldPerson:null,heldPersonName:""},loading:!1,initFileList:[],selectUserList:[],ruleForm:{title:[{required:!0,message:"请填写主题内容",trigger:"change"}],taskType:[{required:!0,message:"请选择任务类型",trigger:"change"}],taskLevel:[{required:!0,message:"请选择任务等级",trigger:"change"}],expireDate:[{required:!0,message:"请选择完成时间",trigger:"change"}],heldPersonName:[{required:!0,message:"请选择责任人",trigger:"change"}]},btnIsShow:!0,typeList:[],levelList:[],dialogImageUrl:"",dialogVisible:!1,chooseUserVisible:!1,isDisabled:!1,report_id:null,report_no:"",report_order_type:null,report_stage_type:null,redirect:"",config:__WEBPACK_IMPORTED_MODULE_9__utils_config_js__.a}},watch:{formData:{handler:function(e,t){""==e.heldPerson&&(this.formData.deptName="",this.formData.heldPersonName="")},deep:!0}},mounted:function(){this.initialize(),this.$route.query.id&&(this.formData.id=this.$route.query.id,this.getDetail()),this.$route.query.report_id&&(this.report_id=this.$route.query.report_id),this.$route.query.report_no&&(this.report_no=this.$route.query.report_no),this.$route.query.report_order_type&&(this.report_order_type=this.$route.query.report_order_type,this.formData.taskType=parseInt(this.$route.query.report_order_type)),this.$route.query.report_stage_type&&(this.report_stage_type=this.$route.query.report_stage_type),this.$route.query.redirect&&(this.redirect=this.$route.query.redirect)},methods:__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_5_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{getUser:function(e){this.$set(this.formData,"heldPersonName",e.name),this.$set(this.formData,"heldPerson",e.id),this.$set(this.formData,"deptName",e.deptName)},getDetail:function(){var e=this,t=this;this.loading=!0,this.$api.taskMainAPI.detail(this.formData.id).then(function(a){if(0===a.code){if(e.formData=__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_assign___default()({},e.formData,a.taskMain),a.ccIdList&&a.ccIdList.forEach(function(e){t.selectUserList.push(e)}),a.heldPerson&&(e.formData.heldPerson=parseInt(a.heldPerson.employeeId),e.formData.heldPersonName=a.heldPerson.userName),58===e.formData.statusId&&(e.btnIsShow=!1),a.initFileList&&a.initFileList.length>0){e.initFileList=[];for(var i=0;i<a.initFileList.length;i++){var s={name:a.initFileList[i].id,url:e.ftpPrefix+a.initFileList[i].filePath};e.initFileList.push(s),e.formData.taglocationappearanceImage.push(a.initFileList[i].filePath)}}e.loading=!1}}).catch(function(t){e.loading=!1})},initialize:function(){var e=this;__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_promise___default.a.all([this.$api.dictAPI.getDictsByType("task_type"),this.$api.dictAPI.getDictsByType("task_level")]).then(function(t){var a=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray___default()(t,2),i=a[0],s=a[1];0===i.code&&(e.typeList=i.datas),0===s.code&&(e.levelList=s.datas)}).catch(function(e){console.log(e)})},save_back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.redirect?this.report_id?this.$router.push({path:this.redirect,query:{t:Date.now(),id:this.report_id,stage_type:this.report_stage_type}}):this.$router.push({path:this.redirect,query:{t:Date.now()}}):this.$router.push({path:"/task/index"})},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.go(-1)},tempSave:function(e){var t=this;if(this.selectUserList){var a=[];this.selectUserList.forEach(function(e){a.push(e.id)}),this.formData.ccList=a}this.report_no&&(this.formData.linkOrderNo=this.report_no,this.formData.linkOrderType=this.report_order_type,this.formData.linkStageType=this.report_stage_type),this.$refs[e].validate(function(e){if(!e)return!1;t.isDisabled||(t.isDisabled=!0,t.$api.taskMainAPI.saveTS(t.formData).then(function(e){t.isDisabled=!1,0===e.code?(t.$message({message:e.msg,type:"success"}),t.save_back()):t.$message({message:e.msg,type:"error"})}))})},save:function(e){var t=this;if(this.selectUserList){var a=[];this.selectUserList.forEach(function(e){a.push(e.id)}),this.formData.ccList=a}this.report_no&&(this.formData.linkOrderNo=this.report_no,this.formData.linkOrderType=this.report_order_type,this.formData.linkStageType=this.report_stage_type),this.$refs[e].validate(function(e){if(!e)return!1;t.isDisabled||(t.isDisabled=!0,t.$api.taskMainAPI.save(t.formData).then(function(e){t.isDisabled=!1,0===e.code?(t.$message({message:e.msg,type:"success"}),t.save_back()):t.$message({message:e.msg,type:"error"})}))})},gotoReport:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/report/8dinfo",query:{id:this.report_id,stage_type:this.report_stage_type}})},httpRequest:function httpRequest(upload,name){var _this=this,xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=function(){if(4==xmlhttp.readyState)if(200==xmlhttp.status){_this.fullscreenLoading=!1;var data=eval("("+xmlhttp.responseText+")");0==data.code?(upload.filePath=data.filePath,_this.formData.taglocationappearanceImage.push(data.filePath)):(_this.$message.error("上传失败"),_this.$refs.upload.uploadFiles.splice(_this.$refs.upload.uploadFiles.length-1,1))}else _this.fullscreenLoading=!1,_this.$message.error("上传失败"),_this.$refs.upload.uploadFiles.splice(_this.$refs.upload.uploadFiles.length-1,1)};var tempFormData=new FormData;tempFormData.append("file",upload,name),xmlhttp.open("POST",this.uploadUrl,!0),xmlhttp.send(tempFormData)},onChange:function(e,t){if(e=e.raw,!/image\/\w+/.test(e.type))return this.$message({message:"只能上传图片",type:"warning"}),this.$refs.upload.uploadFiles.splice(this.$refs.upload.uploadFiles.length-1,1),!1;this.fullscreenLoading=!0;var a=this;__WEBPACK_IMPORTED_MODULE_10__utils_conversion_js__.a.compressAccurately(e,400).then(function(t){t.size?a.httpRequest(t,e.name):(a.$message.error("压缩图片失败"),a.fullscreenLoading=!1,a.$refs.upload.uploadFiles.splice(a.$refs.upload.uploadFiles.length-1,1))})},handleRemove:function(e,t){if(e.raw)this.formData.taglocationappearanceImage.splice(this.formData.taglocationappearanceImage.indexOf(e.raw.filePath),1);else{var a=this.formData.taglocationappearanceImage.indexOf(e.url.substr(1));this.formData.taglocationappearanceImage.splice(a,1)}},uploadSuccess:function(e,t){"操作成功"===e.msg&&this.formData.taglocationappearanceImage.push(e.filePath)},handlePictureCardPreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0}})}},iQ3T:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("Rztb"),s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box taskinfo"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.back()}}},[e._v(e._s(e.config.cancelText))]),e._v(" "),e.btnIsShow?a("el-button",{attrs:{type:"primary",disabled:e.isDisabled},on:{click:function(t){return e.tempSave("form")}}},[e._v("暂存")]):e._e(),e._v(" "),e.btnIsShow?a("el-button",{attrs:{type:"primary",disabled:e.isDisabled},on:{click:function(t){return e.save("form")}}},[e._v("提交")]):e._e()],1),e._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"form",attrs:{"label-width":"120px",model:e.formData,rules:e.ruleForm}},[a("el-form-item",{attrs:{label:"主题",prop:"title"}},[a("el-input",{attrs:{placeholder:"请填写主题内容"},model:{value:e.formData.title,callback:function(t){e.$set(e.formData,"title",t)},expression:"formData.title"}})],1),e._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"任务类型",prop:"taskType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择任务类型"},model:{value:e.formData.taskType,callback:function(t){e.$set(e.formData,"taskType",t)},expression:"formData.taskType"}},e._l(e.typeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"任务等级",prop:"taskLevel"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择任务等级"},model:{value:e.formData.taskLevel,callback:function(t){e.$set(e.formData,"taskLevel",t)},expression:"formData.taskLevel"}},e._l(e.levelList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"要求完成时间",prop:"expireDate"}},[a("el-date-picker",{attrs:{type:"datetime",format:"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.expireDate,callback:function(t){e.$set(e.formData,"expireDate",t)},expression:"formData.expireDate"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"详细描述"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入描述",autosize:{minRows:4}},model:{value:e.formData.detail,callback:function(t){e.$set(e.formData,"detail",t)},expression:"formData.detail"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"照片上传"}},[a("el-upload",{directives:[{name:"loading",rawName:"v-loading.lock",value:e.fullscreenLoading,expression:"fullscreenLoading",modifiers:{lock:!0}}],ref:"upload",attrs:{action:e.uploadUrl,"file-list":e.initFileList,"list-type":"picture-card","on-preview":e.handlePictureCardPreview,"on-success":e.uploadSuccess,"on-remove":e.handleRemove,accept:".png,.jpg,.jpeg","auto-upload":e.auto_upload,"on-change":e.onChange}},[a("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"责任人",prop:"heldPersonName"}},[a("btn-input",{attrs:{valueText:e.formData.heldPersonName,valueId:e.formData.heldPerson,chooseVisible:e.chooseUserVisible},on:{"update:valueText":function(t){return e.$set(e.formData,"heldPersonName",t)},"update:value-text":function(t){return e.$set(e.formData,"heldPersonName",t)},"update:valueId":function(t){return e.$set(e.formData,"heldPerson",t)},"update:value-id":function(t){return e.$set(e.formData,"heldPerson",t)},"update:chooseVisible":function(t){e.chooseUserVisible=t},"update:choose-visible":function(t){e.chooseUserVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"责任部门:"}},[a("el-input",{attrs:{placeholder:"选责任人自动带出",readonly:""},model:{value:e.formData.deptName,callback:function(t){e.$set(e.formData,"deptName",t)},expression:"formData.deptName"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"抄送人"}},[a("SearchMulitUsers",{attrs:{initcurlists:e.selectUserList}})],1)],1),e._v(" "),a("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1),e._v(" "),a("DialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}})],1)},staticRenderFns:[]};var r=function(e){a("DKSx"),a("OR2w")},_=a("VU/8")(i.a,s,!1,r,"data-v-603ed83f",null);t.default=_.exports}});