1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0c618c5c"],{"29f5":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:"app-container"},[a("search-form"),a("table-list",{attrs:{listLoading:t.listLoading,data:t.tableData2,columns:t.listConfig,currentPage:t.currentPage,pageSize:t.pageSize,totalRecords:t.totalRecords,isAdd:!0},on:{currentChange:t.pageHandle,sizeChange:t.sizeChange,add:t.openPopup}}),a("dict-edit",{attrs:{isShow:t.isPopupShow,curObj:t.curObj},on:{close:t.closePopup}})],1)},n=[],s=a("2909"),r=(a("d81d"),a("a9e3"),a("ed08"),a("b810")),o=a("2b7f"),c=a("4fef"),l={components:{SearchForm:r["default"],DictEdit:o["default"]},provide:function(){return{parentData:this}},mixins:[c["default"]],data:function(){return{apiStr:"zt.admverify2list",searchForm:null,isPopupShow:!1,noCreated:!0,curObj:{},curId:"",curPid:""}},computed:{tableData2:function(){var t=Object(s["a"])(this.tableData);return t.map((function(t){1===Number(t.system)&&(t.nosys=!0)})),t}},mounted:function(){this.listConfig={rows:[{label:"检查项",prop:"content",align:"left"},{label:"更新人",prop:"update_by",width:120},{label:"更新时间",prop:"update_at",width:120},{label:"操作",width:120,type:"handle2",operations:[{label:"编辑",func:this.openPopup,btnType:"primary"},{label:"删除",func:this.delHandle,btnType:"danger",hide:"nosys"}]}]};var t=this.$route.query;t.id&&(this.curPid=t.id||"",this.searchForm={verify1_id:t.id},this.fetchData())},methods:{delHandle:function(t){var e=this,a="确定要删除此选项吗?";this.$msg(a,"confirm",(function(){e.$api.zt.admverify2del({id:t.id}).then((function(t){e.$msgs("删除成功!"),e.fetchData()}))}),null,!0)},statusHandle:function(t){var e=this,a=1===Number(t.status)?2:1,i=1===Number(t.status)?"停用":"启用";this.$msg("确定要".concat(i,"该字典吗?"),"confirm",(function(){e.$api.base.dictupdate({id:t.id,status:a}).then((function(t){e.$msgs("".concat(i,"成功!")),e.fetchData()}))}),null,!0)},openPopup:function(t){this.curObj=t||{},this.isPopupShow=!0},closePopup:function(t){this.isPopupShow=!1,t&&this.fetchData()}}},u=l,h=a("2877"),d=Object(h["a"])(u,i,n,!1,null,null,null);e["default"]=d.exports},"2b7f":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("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"show-close":!1,"close-on-click-modal":!1,visible:t.isShow,title:this.curObj&&this.curObj.typeName?"编辑项目选项":"添加项目选项",fullscreen:!1,width:"470px","custom-class":"xl-dialog",center:""},on:{"update:visible":function(e){t.isShow=e}}},[a("base-form",{ref:"ruleForm",staticStyle:{width:"400px"},attrs:{data:t.formData,isInline:!1,labelWidth:"100px"}},[a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"xl-form-btn t2",on:{click:t.close}},[t._v("关 闭")]),a("el-button",{staticClass:"xl-form-btn t1",on:{click:function(e){return t.close("confirm")}}},[t._v("确定")])],1)])],1)},n=[],s=a("5530"),r={props:{isShow:Boolean,curObj:Object},inject:["parentData"],mixins:mixins,data:function(){return{formData:[],loading:!0}},watch:{isShow:function(t){if(t){var e=Object(s["a"])({},this.curObj);this.formData=[{label:"选项",key:"content",type:"textarea",rules:1}],this.setDefaultValue(e)}}},methods:{close:function(t){var e=this;"confirm"===t||"next"===t?this.$refs["ruleForm"].$refs["baseForm"].validate((function(a){if(a){var i=e.$refs.ruleForm.baseForm,n=Object(s["a"])({},i);n.verify1_id=e.parentData.curPid;var r="admverify2add";e.curObj&&e.curObj.id&&(n.id=e.curObj.id,r="admverify2edit"),e.$api.zt[r](n).then((function(a){e.$msgs("保存成功!"),"next"===t?e.setDefaultValue():e.$emit("close",n)}))}})):(this.$emit("close"),this.setDefaultValue())}}},o=r,c=a("2877"),l=Object(c["a"])(o,i,n,!1,null,null,null);e["default"]=l.exports},"4fef":function(t,e,a){"use strict";a.r(e);var i=a("ade3"),n=a("5530");a("4e82"),a("e9c4"),a("a9e3");e["default"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var e=Object(n["a"])({},this.searchForm);"ascending"===t.order?e.sort=JSON.stringify(Object(i["a"])({},t.prop,"asc")):e.sort=JSON.stringify(Object(i["a"])({},t.prop,"desc")),this.searchForm=Object(n["a"])({},e),this.fetchData(e)},fetchData:function(t){var e=this;if(this.apiStr){var a={page:this.currentPage,page_size:this.pageSize};t?a=Object(n["a"])(Object(n["a"])({},a),t):this.searchForm&&(a=Object(n["a"])(Object(n["a"])({},a),this.searchForm)),this.getDataBefore&&this.getDataBefore(a),this.listLoading=!0;var i=this.apiStr.split(".");this.$api[i[0]][i[1]](a).then((function(t){return 1===e.currentPage&&(e.pageSize=t.page_size||1),e.totalRecords=t.total?Number(t.total):0,e.tableData=t.list||[],e.listLoading=!1,e.getMoreData&&e.getMoreData(t,a),t})).catch((function(t){e.listLoading=!1}))}}}}},b810: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("base-form",{ref:"ruleForm",attrs:{noLabel:!1,isInline:!1,data:t.searchData}})},n=[],s=a("5530"),r={props:{listLoading:Boolean},inject:["parentData"],mixins:mixins,data:function(){return{searchData:[{label:"项目包",disabled:!0,key:"name",width:"200px"}]}},mounted:function(){var t=this.parentData.$route.query||{};this.setDefaultValue(t,"searchData")},methods:{searchHandle:function(){var t=this.$refs.ruleForm.baseForm,e=Object(s["a"])({},t);this.$emit("change",e)},add:function(){this.$emit("add")}}},o=r,c=a("2877"),l=Object(c["a"])(o,i,n,!1,null,null,null);e["default"]=l.exports}}]);
|