Your Name
2022-04-08 1f2a259f8cbb7eb0b12d12895116c309eb8cd609
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-1e35"],{"41Be":function(t,e,a){"use strict";a.d(e,"a",function(){return i});var r=a("rerW"),n=a.n(r),o=a("Q2AE");function i(t,e){if(1==t||2==t)return!0;if(!e)return!1;var a=o.a.getters&&o.a.getters.roles;if(a&&a.length>0){var r=!0,i=!1,s=void 0;try{for(var l,c=n()(a);!(r=(l=c.next()).done);r=!0){var u=l.value.btnAccess;if(!u)return!1;var d=u.split(",");if(-1!=d.indexOf("all"))return!0;if(-1!=d.indexOf(e))return!0}}catch(t){i=!0,s=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw s}}return!1}return!1}},"5W5M":function(t,e,a){"use strict";a.d(e,"g",function(){return o}),a.d(e,"b",function(){return i}),a.d(e,"d",function(){return s}),a.d(e,"i",function(){return l}),a.d(e,"f",function(){return c}),a.d(e,"e",function(){return u}),a.d(e,"a",function(){return d}),a.d(e,"c",function(){return p}),a.d(e,"h",function(){return m});var r=a("t3Un"),n=a("X4fA");function o(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/dictionary-types",method:"get",params:t||{}})}function i(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/adddictionary-types",method:"post",data:t})}function s(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/deldictionary-types",method:"post",data:t})}function l(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/putdictionary-types",method:"post",data:t})}function c(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/dictionary-items",method:"get",params:t||{}})}function u(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/dictionaryAllItems",method:"get",params:t||{}})}function d(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/adddictionary-items",method:"post",data:t})}function p(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/deldictionary-items",method:"post",data:t})}function m(t){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/putdictionary-items",method:"post",data:t})}},"vXh/":function(t,e,a){t.exports=a.p+"static/file/selfcheck.xlsx"},"yF+r":function(t,e,a){"use strict";a.r(e);var r=a("rerW"),n=a.n(r),o=a("bS4n"),i=a.n(o),s=a("8t5x"),l=a("X4fA"),c=a("t3Un");var u=a("7Qib"),d=a("8fCU"),p=(a("jJIE"),a("4f16")),m=a("5W5M"),h=a("41Be"),f=a("vXh/"),b={name:"selfcheck",filters:{},computed:i()({},Object(s.b)(["userType"])),data:function(){return{sort:"createddate",order:"desc",pageSize:10,recordTotal:0,currentPage:1,pageTotal:0,tableKey:0,selfCheckData:null,listLoading:!0,dataForm:{id:"",tasktype:"",type:"",checktype:"",content:"",standard:"",description:"",sort:""},queryForm:{tasktype:"",type:"",content:""},taskTypeList:[],checkTypeList:[],checkTypes:[{text:"判断"},{text:"填空"}],dialogFormVisible:!1,dialogStatus:"",dataFormRules:{tasktype:[{required:!0,message:"作业类型不能为空",trigger:"blur"}],type:[{required:!0,message:"类型不能为空",trigger:"blur"}],checktype:[{required:!0,message:"检查类型不能为空",trigger:"blur"}],content:[{required:!0,message:"检查内容不能为空",trigger:"blur"}],standard:[{required:!0,message:"参考判断不能为空",trigger:"blur"}],sort:[{required:!0,message:"序号不能为空",trigger:"blur"}]},importDisabled:!1,importDialogFormVisible:!1}},created:function(){this.getSelfCheckList(),this.getDictionaryCheckType(),this.getDictionaryTaskType()},methods:{getSelfCheckList:function(){var t=this,e={};e.sort=t.sort,e.order=t.order,e.pageIndex=t.currentPage,e.pageSize=t.pageSize,e.type=t.queryForm.type,e.content=t.queryForm.content,t.listLoading=!0,function(t){return Object(c.a)({headers:{Authorization:Object(l.a)()},url:"http://222.92.213.21:8006/zhongtai/selfCheck",method:"get",params:t||{}})}(e).then(function(e){var a=e.data;if(200==a.code){var r=a.result;t.recordTotal=r.totalCount,t.pageSize=r.pageSize,t.pageTotal=Object(u.a)(r.totalCount,r.pageSize),t.currentPage=r.pageIndex,t.selfCheckData=r.result}else Object(d.a)({error:a.data.message,vm:t});t.listLoading=!1}).catch(function(e){t.listLoading=!1,Object(d.a)({error:e,vm:t})})},getDictionaryCheckType:function(){var t=this;if(!(t.checkTypeList&&t.checkTypeList.length>0)){var e={dictionaryType:"检查类型"};Object(m.e)(e).then(function(e){var a=e.data;200==a.code?t.checkTypeList=a.result:Object(d.a)({error:a.data.message,vm:t})}).catch(function(e){Object(d.a)({error:e,vm:t})})}},getDictionaryTaskType:function(){var t=this;if(!(t.taskTypeList&&t.taskTypeList.length>0)){var e={dictionaryType:"作业类型"};Object(m.e)(e).then(function(e){var a=e.data;200==a.code?t.taskTypeList=a.result:Object(d.a)({error:a.data.message,vm:t})}).catch(function(e){Object(d.a)({error:e,vm:t})})}},createHandle:function(){var t=this;this.$refs.dataForm.validate(function(e){e&&function(t){return Object(c.a)({headers:{Authorization:Object(l.a)()},url:"http://222.92.213.21:8006/zhongtai/addselfCheck",method:"post",data:t})}(t.dataForm).then(function(e){var a=e.data;200==a.code?(t.dialogFormVisible=!1,t.$message({message:"创建成功",type:"success"}),t.getSelfCheckList()):Object(d.a)({error:a.data.message,vm:t})}).catch(function(e){Object(d.a)({error:e,vm:t})})})},bashDeleteHandle:function(){var t=this,e=this.$refs.selfCheckTable.selection;0!=e.length?p.MessageBox.confirm("确定删除选中的信息","确定删除",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.bashDeleteSelfCheckAction(e)}).catch(function(t){console.log(t,"已取消删除")}):Object(d.a)({error:"请选中需要删除的信息",vm:this})},bashDeleteSelfCheckAction:function(t){var e=this,a={},r=[],o=!0,i=!1,s=void 0;try{for(var u,p=n()(t);!(o=(u=p.next()).done);o=!0){var m=u.value;r.push(m.id)}}catch(t){i=!0,s=t}finally{try{!o&&p.return&&p.return()}finally{if(i)throw s}}a.ids=r,function(t){return Object(c.a)({headers:{Authorization:Object(l.a)()},url:"http://222.92.213.21:8006/zhongtai/selfChecks",method:"post",data:t})}(a).then(function(t){var a=t.data;200==a.code?(e.$message({message:"删除成功",type:"success"}),e.getSelfCheckList()):Object(d.a)({error:a.data.message,vm:e})}).catch(function(t){Object(d.a)({error:t,vm:e})})},deleteHandle:function(t){var e=this;p.MessageBox.confirm("确定删除"+t.type+"信息","确定删除",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.deleteAction(t)}).catch(function(){console.log("已取消删除")})},deleteAction:function(t){var e=this,a={};a.id=t.id,function(t){return Object(c.a)({headers:{Authorization:Object(l.a)()},url:"http://222.92.213.21:8006/zhongtai/delselfCheck",method:"post",data:t})}(a).then(function(t){var a=t.data;200==a.code?(e.$message({message:"删除成功",type:"success"}),e.getSelfCheckList()):Object(d.a)({error:a.data.message,vm:e})}).catch(function(t){Object(d.a)({error:t,vm:e})})},refreshHandle:function(){this.getSelfCheckList()},queryHandle:function(){this.currentPage=1,this.getSelfCheckList()},resetDataForm:function(){this.dataForm={id:"",type:"",checktype:"",content:"",standard:"",description:"",sort:""}},sortSelfCheckChange:function(t){this.sort=t.prop,this.order=t.order,this.getSelfCheckList()},showCreateHandle:function(){var t=this;this.resetDataForm(),this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick(function(){t.$refs.dataForm.clearValidate()})},updateHandle:function(){var t=this;this.$refs.dataForm.validate(function(e){var a=t;e&&function(t){return Object(c.a)({headers:{Authorization:Object(l.a)()},url:"http://222.92.213.21:8006/zhongtai/putselfCheck",method:"post",data:t})}(a.dataForm).then(function(t){var e=t.data;200==e.code?(a.dialogFormVisible=!1,a.$message({message:"更新成功",type:"success"}),a.getSelfCheckList()):Object(d.a)({error:e.data.message,vm:a})}).catch(function(t){Object(d.a)({error:t,vm:a})})})},showEditHandle:function(t){var e=this;this.resetDataForm(),this.dialogStatus="editor",this.dataForm.type=t.type,this.dataForm.checktype=t.checktype,this.dataForm.id=t.id,this.dataForm.content=t.content,this.dataForm.description=t.description,this.dataForm.standard=t.standard,this.dataForm.sort=t.sort,this.dialogFormVisible=!0,this.$nextTick(function(){e.$refs.dataForm.clearValidate()})},handleSizeChange:function(t){this.pageSize=t,this.currentPage=1,this.getSelfCheckList()},handleCurrentChange:function(t){this.currentPage=t,this.getSelfCheckList()},getBtnPermission:function(t){return Object(h.a)(this.userType,t)},showImportHandle:function(){this.importDisabled=!1,this.importDialogFormVisible=!0},viewHandle:function(){window.open(f,"_blank")},importHandle:function(){var t=this,e=new FormData,a=this.$refs.importLabInput.files;a&&a.length>0&&e.append("file",a[0]),function(t){return Object(c.a)({headers:{Authorization:Object(l.a)()},url:"http://222.92.213.21:8006/zhongtai/importSelfCheck",method:"post",data:t})}(e).then(function(e){var a=e.data;200==a.code?(t.importDialogFormVisible=!1,t.$message({message:"导入成功",type:"success"}),t.getSelfCheckList()):Object(d.a)({error:a.message,vm:t})}).catch(function(e){Object(d.a)({error:e,vm:t})})}}},y=a("ZrdR"),g=Object(y.a)(b,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",[a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.refreshHandle}},[t._v("刷新")]),t._v(" "),t.getBtnPermission("add")?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.showCreateHandle}},[t._v("新增")]):t._e(),t._v(" "),t.getBtnPermission("import")?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-upload2"},on:{click:t.showImportHandle}},[t._v("导入")]):t._e(),t._v(" "),t.getBtnPermission("delete")?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-minus"},on:{click:t.bashDeleteHandle}},[t._v("批量删除")]):t._e(),t._v(" "),a("el-select",{attrs:{clearable:"",placeholder:"请选择作业类型"},model:{value:t.queryForm.tasktype,callback:function(e){t.$set(t.queryForm,"tasktype",e)},expression:"queryForm.tasktype"}},t._l(t.taskTypeList,function(e){return a("el-option",{key:e.value,staticClass:"filter-item",attrs:{label:e.label,value:e.value},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.queryHandle(e):null}}})})),t._v(" "),a("el-select",{attrs:{clearable:"",placeholder:"请选择检查类型"},model:{value:t.queryForm.type,callback:function(e){t.$set(t.queryForm,"type",e)},expression:"queryForm.type"}},t._l(t.checkTypeList,function(e){return a("el-option",{key:e.value,staticClass:"filter-item",attrs:{label:e.label,value:e.value},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.queryHandle(e):null}}})})),t._v(" "),a("el-input",{staticClass:"filter-item",staticStyle:{width:"400px"},attrs:{placeholder:"输入检查内容",clearable:""},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.queryHandle(e):null}},model:{value:t.queryForm.content,callback:function(e){t.$set(t.queryForm,"content",e)},expression:"queryForm.content"}}),t._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.queryHandle}})],1),t._v(" "),a("div",{staticClass:"table_content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,ref:"selfCheckTable",staticStyle:{width:"100%"},attrs:{data:t.selfCheckData,border:"",fit:"","highlight-current-row":""},on:{"sort-change":t.sortSelfCheckChange}},[a("el-table-column",{attrs:{type:"selection",align:"center",width:"80"}}),t._v(" "),a("el-table-column",{attrs:{label:"作业类型",prop:"type",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.tasktype))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"类型",prop:"type",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.type))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"检查类型",prop:"type",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.checktype))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"检查内容",prop:"content",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.content))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"参考判断",prop:"standard",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.standard))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"排序",prop:"sort",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.sort))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"description",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.description))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"更新人",prop:"modifiedby",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.modifiedby))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"更新时间",prop:"modifieddate",align:"center",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("parseTime")(e.row.modifieddate,"{y}-{m}-{d}")))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"240","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.getBtnPermission("edit")?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.showEditHandle(e.row)}}},[t._v("编辑")]):t._e(),t._v(" "),t.getBtnPermission("delete")?a("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(a){t.deleteHandle(e.row)}}},[t._v("删除")]):t._e()]}}])})],1),t._v(" "),a("br"),t._v(" "),a("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":t.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pageSize,total:t.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{title:"create"===t.dialogStatus?"新增":"编辑",visible:t.dialogFormVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,width:"700px"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",{ref:"dataForm",staticStyle:{"margin-left":"50px",width:"500px"},attrs:{rules:t.dataFormRules,model:t.dataForm,"label-position":"right","label-width":"100px","element-loading-text":"保存中..."}},[a("el-form-item",{attrs:{label:"作业类型:",prop:"type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择作业类型"},model:{value:t.dataForm.tasktype,callback:function(e){t.$set(t.dataForm,"tasktype","string"==typeof e?e.trim():e)},expression:"dataForm.tasktype"}},t._l(t.taskTypeList,function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.text}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"类型:",prop:"type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择类型"},model:{value:t.dataForm.type,callback:function(e){t.$set(t.dataForm,"type","string"==typeof e?e.trim():e)},expression:"dataForm.type"}},t._l(t.checkTypeList,function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.text}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"检查类型:",prop:"type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择检查类型"},model:{value:t.dataForm.checktype,callback:function(e){t.$set(t.dataForm,"checktype","string"==typeof e?e.trim():e)},expression:"dataForm.checktype"}},t._l(t.checkTypes,function(t,e){return a("el-option",{key:e,attrs:{label:t.text,value:t.text}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"检查内容:",prop:"content"}},[a("el-input",{attrs:{autosize:{minRows:2,maxRows:4},type:"textarea"},model:{value:t.dataForm.content,callback:function(e){t.$set(t.dataForm,"content","string"==typeof e?e.trim():e)},expression:"dataForm.content"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"参考判断:",prop:"standard"}},[a("el-radio-group",{model:{value:t.dataForm.standard,callback:function(e){t.$set(t.dataForm,"standard",e)},expression:"dataForm.standard"}},[a("el-radio",{attrs:{label:"Y"}},[t._v("Y")]),t._v(" "),a("el-radio",{attrs:{label:"N"}},[t._v("N")])],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"排序值",prop:"sort"}},[a("el-input-number",{attrs:{min:0,max:100},model:{value:t.dataForm.sort,callback:function(e){t.$set(t.dataForm,"sort",t._n(e))},expression:"dataForm.sort"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"备注:",prop:"description"}},[a("el-input",{attrs:{autosize:{minRows:2,maxRows:4},type:"textarea"},model:{value:t.dataForm.description,callback:function(e){t.$set(t.dataForm,"description","string"==typeof e?e.trim():e)},expression:"dataForm.description"}})],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){"create"===t.dialogStatus?t.createHandle():t.updateHandle()}}},[t._v("确认")])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.importDialogFormVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,title:"自定义检查内容导入",width:"700px"},on:{"update:visible":function(e){t.importDialogFormVisible=e}}},[a("el-form",{ref:"importForm",staticStyle:{"margin-left":"50px",width:"500px"},attrs:{"label-position":"right","label-width":"120px","element-loading-text":"导入中..."}},[a("el-form-item",{attrs:{label:"导入文件:"}},[a("input",{ref:"importLabInput",attrs:{type:"file",accept:".xls, .xlsx"}})]),t._v(" "),a("el-form-item",{attrs:{label:"excel参考模板:"}},[a("el-button",{attrs:{type:"text"},on:{click:t.viewHandle}},[t._v("下载模板")])],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.importDialogFormVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{disabled:t.importDisabled,type:"primary"},on:{click:function(e){t.importHandle()}}},[t._v("导入")])],1)],1),t._v(" "),a("div",{staticStyle:{clear:"both"}})],1)},[],!1,null,null,null);g.options.__file="index.vue";e.default=g.exports}}]);