chunk-4217b444.18e023a2.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4217b444"],{"18d4":function(t,e,a){var i=a("c8f5");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("0e3cd498",i,!0,{sourceMap:!1,shadowMode:!1})},"53a2":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"DictionarySetting-page"},[a("TargetSearch",{on:{openAddPop:t.openAddRolePop,searchEvent:t.searchEvent}}),a("Card",{staticClass:"ProductionTechnology-card",attrs:{bordered:!1,shadow:!0}},[a("div",{staticClass:"header-top-box",attrs:{slot:"title"},slot:"title"},[a("div",{staticClass:"title-value"},[t._v("字典管理")]),a("Button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary",icon:"ios-add-circle-outline"},on:{click:function(e){return t.openAddRolePop()}}},[t._v("新增")])],1),a("Table",{ref:"selection",staticClass:"iv-custom-table",attrs:{"row-key":"id",stripe:!0,width:"100%",columns:t.columns1,border:!0,data:t.tableList},on:{"on-sort-change":t.sortEvent},scopedSlots:t._u([{key:"action",fn:function(e){var i=e.row;e.index;return a("div",{staticClass:"iv-button-box"},[a("Button",{staticClass:"iv-custom-button",staticStyle:{margin:"5px"},attrs:{disabled:1===i.status,type:"primary"},on:{click:function(e){return t.openEditEvaluatePop(i)}}},[t._v("编辑 ")]),a("Button",{staticClass:"iv-custom-button",staticStyle:{margin:"5px"},attrs:{type:"error"},on:{click:function(e){return t.openDeleteEvaluatePop(i)}}},[t._v("删除 ")])],1)}}])}),a("div",{staticClass:"ivu-card-footer"},[a("Page",{attrs:{"class-name":"iv-custom-page",current:t.searchData.pageNum,total:t.searchData.totalNum,size:"small","show-total":"","show-sizer":"","show-elevator":""},on:{"on-change":t.pageNumChang,"on-page-size-change":t.sizeChange}})],1)],1),t.displayPop?a("Modal",{attrs:{transfer:!1,title:t.popTitle,width:"760px"},model:{value:t.displayPop,callback:function(e){t.displayPop=e},expression:"displayPop"}},[a("div",[a("Form",{ref:"popRefsForm",attrs:{"label-width":140,rules:t.rulesForm,model:t.formData}},[a("FormItem",{staticStyle:{"text-align":"left"},attrs:{label:"字典名称:",prop:"val"}},[a("Input",{model:{value:t.formData.val,callback:function(e){t.$set(t.formData,"val",e)},expression:"formData.val"}})],1),a("FormItem",{staticStyle:{"text-align":"left"},attrs:{label:"关键字类型:",prop:"type"}},[a("Select",{staticClass:"lg-fm-item-Select",attrs:{transfer:!1,placeholder:"请选择或输入关键字类型",filterable:"","allow-create":"",clearable:""},on:{"on-create":t.handleCreate1},model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}},t._l(t.keyValueList,(function(e){return a("Option",{key:e,attrs:{value:e}},[t._v(t._s(e)+" ")])})),1)],1),a("FormItem",{staticStyle:{"text-align":"left"},attrs:{label:"父节点:"}},[a("Cascader",{attrs:{transfer:!1,"change-on-select":"",data:t.dictTree},model:{value:t.formData.pidList,callback:function(e){t.$set(t.formData,"pidList",e)},expression:"formData.pidList"}})],1),a("FormItem",{staticStyle:{"text-align":"left"},attrs:{prop:"k",label:"参数值:"}},[a("Input",{model:{value:t.formData.k,callback:function(e){t.$set(t.formData,"k",e)},expression:"formData.k"}})],1),a("FormItem",{staticStyle:{"text-align":"left"},attrs:{label:"评价等级:"}},[a("Input",{model:{value:t.formData.grade,callback:function(e){t.$set(t.formData,"grade",e)},expression:"formData.grade"}})],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"error"},on:{click:t.closePop}},[t._v("取消")]),"add"===t.btType?a("Button",{attrs:{type:"primary"},on:{click:t.ReleaseSave}},[t._v("确认")]):t._e(),"edit"===t.btType?a("Button",{attrs:{type:"primary"},on:{click:t.editSave}},[t._v("确认")]):t._e()],1)]):t._e()],1)},o=[],r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Card",{staticClass:"tgS-card",attrs:{bordered:!1,shadow:!0}},[a("Form",{staticClass:"pt-card-form",attrs:{"label-width":120,inline:!0}},[a("FormItem",{staticClass:"pt-form-item",attrs:{label:"字典名称:"}},[a("Input",{attrs:{type:"text",placeholder:"请输入字典名称"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),a("FormItem",{staticClass:"pt-form-item",attrs:{label:"关键字类型:"}},[a("Input",{attrs:{type:"text",placeholder:"请输入关键字类型"},model:{value:t.formData.keyValue,callback:function(e){t.$set(t.formData,"keyValue",e)},expression:"formData.keyValue"}})],1),a("Button",{attrs:{icon:"md-search",type:"primary"},on:{click:t.searchEvent}},[t._v("查询")])],1)],1)},s=[],l={name:"TargetSearch",data(){return{formData:{name:"",keyValue:""}}},methods:{addEvent(){this.$emit("openAddPop")},searchEvent(){this.$emit("searchEvent",this.formData)},addEventTest(){let t=[{id:"",pid:"118",grade:"",type:"project_type",k:"2.5.1",val:"生态质量监测"},{id:"",pid:"118",grade:"",type:"project_type",k:"2.5.2",val:"生态质量评价"},{id:"",pid:"118",grade:"",type:"project_type",k:"2.5.3",val:"其他"},{id:"",pid:"123",grade:"",type:"project_type",k:"2.6.1",val:"排污许可与自行监测"},{id:"",pid:"123",grade:"",type:"project_type",k:"2.6.2",val:"污染源执法监测"},{id:"",pid:"123",grade:"",type:"project_type",k:"2.6.3",val:"环境应急监测"},{id:"",pid:"123",grade:"",type:"project_type",k:"2.6.4",val:"固体废物与危险废物鉴别"},{id:"",pid:"123",grade:"",type:"project_type",k:"2.6.5",val:"其他"},{id:"",pid:"120",grade:"",type:"project_type",k:"2.7.1",val:"无机类实验室分析"},{id:"",pid:"120",grade:"",type:"project_type",k:"2.7.2",val:"有机类实验室分析"},{id:"",pid:"120",grade:"",type:"project_type",k:"2.7.3",val:"生物类实验室分析"},{id:"",pid:"120",grade:"",type:"project_type",k:"2.7.4",val:"物理类实验室分析"},{id:"",pid:"120",grade:"",type:"project_type",k:"2.7.5",val:"其他"},{id:"",pid:"121",grade:"",type:"project_type",k:"2.8.1",val:"质量管理体系"},{id:"",pid:"121",grade:"",type:"project_type",k:"2.8.2",val:"持证上岗考核"},{id:"",pid:"121",grade:"",type:"project_type",k:"2.8.3",val:"监测机构监督检查"},{id:"",pid:"121",grade:"",type:"project_type",k:"2.8.4",val:""},{id:"",pid:"125",grade:"",type:"project_type",k:"2.9.1",val:"数据挖掘与综合评价"},{id:"",pid:"125",grade:"",type:"project_type",k:"2.9.2",val:"其他"}];t.map(async t=>{await this.$Api.publicGetMap.saveDictionary(t)})}}},c=l,p=(a("a642"),a("2877")),n=Object(p["a"])(c,r,s,!1,null,null,null),d=n.exports,u=(a("a6d6"),a("2f62")),h={name:"DictionarySetting",components:{TargetSearch:d},computed:{...Object(u["b"])({dictIndustryList:t=>{const e=t.dictTypeList.filter(t=>{if(t.type)return t}),a=e.map(t=>t.type);function i(t){var e=new Set(t);return[...e]}return i(a)},dictList:t=>t.dictTypeList})},data(){const t=(t,e,a)=>{e?a():a("参数不能为空")};return{formData:{id:"",type:"",pidList:[],val:"",k:"",grade:""},rulesForm:{type:[{required:!0,validator:t,trigger:"blur"}],val:[{required:!0,validator:t,trigger:"blur"}],k:[{required:!0,validator:t,trigger:"blur"}]},columns1:[{type:"index",title:"序号",width:70,align:"center"},{title:"名称",key:"val",align:"center",tree:!0},{title:"类型关键字",key:"type",width:180,align:"center"},{title:"状态值",key:"k",width:180,align:"center"},{title:"创建时间",key:"createTime",width:220,sortable:"custom",align:"center"},{title:"修改时间",key:"updateTime",width:220,align:"center"},{title:"操作",slot:"action",width:240,align:"center"}],tableList:[],displayPop:!1,popTitle:"编辑",saveBtType:"add",searchData:{pageNum:1,totalNum:0,pageSize:10,isAsc:!1,type:"",keyValue:""},dictTree:[],keyValueList:[],btType:"add"}},mounted(){this.doSearch()},methods:{handleCreate1(t){this.keyValueList.push(t)},async sortEvent(t,e,a){this.searchData.isAsc=!this.searchData.isAsc,await this.doSearch()},openAddRolePop(){this.displayPop=!0,this.popTitle="新增字典",this.btType="add",this.$nextTick(()=>{this.getDataList()})},getDataList(){const t=this.$store.state.dictTypeList.filter(t=>{if(t.type)return t}),e=t.map(t=>t.type);var a=new Set(e);this.keyValueList=[...a],this.dictTree=this.$utils.handleTree(this.dictList,"id","pid","val","children")},openReportEvaluatePop(t){this.displayPop=!0,this.formData.id=t.id},openEditEvaluatePop(t){this.btType="edit",this.popTitle="编辑--"+t.val,this.displayPop=!0,this.$nextTick(()=>{this.getDataList();let e={id:t.id,type:t.type,pidList:[...String(t.pid).split(",")],val:t.val,k:t.k,grade:t.grade};this.$set(this,"formData",e)})},closePop(){this.displayPop=!1},openDeleteEvaluatePop(t){this.$Modal.confirm({title:"删除--"+t.val,content:"<p>"+t.val+"</p>",onOk:()=>{this.$Api.publicGetMap.deleteDictionary(t.id).then(e=>{"200"===e.code&&(this.$Message.success({content:t.val+"字典删除成功!"}),this.doSearch())})},onCancel:()=>{this.$Modal.remove()}})},async editSave(){const t=await this.$refs.popRefsForm.validate();if(t){const t=this.formData;let e={id:t.id,val:t.val,pid:t.pidList.length?t.pidList[t.pidList.length-1]:"",grade:t.grade,type:t.type,k:t.k};const a=await this.$Api.publicGetMap.editDictionary(e);"200"===a.code&&(this.$Message.success({content:"修改字典成功!"}),this.closePop(),this.doSearch())}},async ReleaseSave(){const t=await this.$refs.popRefsForm.validate();if(t){const t=this.formData;let e={id:t.id,val:t.val,pid:t.pidList.length?t.pidList[t.pidList.length-1]:"",grade:t.grade,type:t.type,k:t.k};const a=await this.$Api.publicGetMap.saveDictionary(e);"200"===a.code&&(this.$Message.success({content:"新增字典成功!"}),this.closePop(),this.doSearch())}},editRoleSave(){},async pageNumChang(t){this.searchData.pageNum=t,await this.doSearch()},async sizeChange(t){this.searchData.pageSize=t,await this.doSearch()},async searchEvent(t){this.searchData.pageNum=1,this.searchData.type=t.keyValue,this.searchData.val=t.name,await this.doSearch()},async doSearch(){let t={offset:this.searchData.pageNum,limit:this.searchData.pageSize,val:this.searchData.val,type:this.searchData.type,isAsc:this.searchData.isAsc,orderColumn:"createTime",isGroup:!0,groupColumn:"id,name"};const e=await this.$Api.publicGetMap.dictionaryData(t);if("200"===e.code){const t=e.data.records;this.tableList=JSON.parse(JSON.stringify(t)),this.searchData.pageTole=e.data.pages,this.searchData.pageNum=e.data.current,this.searchData.totalNum=e.data.total}}}},y=h,m=(a("ad3e"),Object(p["a"])(y,i,o,!1,null,null,null));e["default"]=m.exports},"5a73":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".tgS-card{margin-bottom:14px}.tgS-card .ivu-card-body{display:flex;justify-content:space-between}.tgS-card .ivu-card-body .pt-card-form{width:80%;display:flex;justify-content:flex-start}.tgS-card .ivu-card-body .pt-card-form .pt-form-item{width:280px;min-width:200px;margin-bottom:0}",""]),t.exports=e},6684:function(t,e,a){var i=a("5a73");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("dcf4378a",i,!0,{sourceMap:!1,shadowMode:!1})},a642:function(t,e,a){"use strict";var i=a("6684"),o=a.n(i);o.a},ad3e:function(t,e,a){"use strict";var i=a("18d4"),o=a.n(i);o.a},c8f5:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".DictionarySetting-page .header-top-box{height:auto;display:flex;justify-content:space-between}.DictionarySetting-page .header-top-box .title-value{line-height:32px;text-align:left;font-size:24px;font-weight:700;color:#2760b7}.DictionarySetting-page .ProductionTechnology-card .iv-custom-table .ivu-table .ivu-table-body .ivu-table-tbody .ivu-table-row .iv-button-box{display:flex;justify-content:flex-start}.DictionarySetting-page .ProductionTechnology-card .iv-custom-table .ivu-table .ivu-table-body .ivu-table-tbody .ivu-table-row .iv-Name-box{display:flex}.DictionarySetting-page .ProductionTechnology-card .ivu-card-footer{margin-top:10px}.DictionarySetting-page .ProductionTechnology-card .ivu-card-footer .footer-botton{float:left;margin-right:10px;color:#4862ea}.DictionarySetting-page .ProductionTechnology-card .ivu-card-footer .footer-botton:focus{box-shadow:0 0 0 0 transparent;color:#131d26}",""]),t.exports=e}}]);