1234567 |
- /*!
- * build: vue-admin-better
- * vue-admin-beautiful.com
- * https://gitee.com/chu1204505056/vue-admin-better
- * time: 2022-6-10 15:26:20
- */
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e7a4f65"],{"661d":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"table-container"},[a("vab-query-form",[a("vab-query-form-left-panel",[a("el-form",{ref:"searchForm",attrs:{model:e.searchForm,inline:!0},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"定时任务名称"},model:{value:e.searchForm.name,callback:function(t){e.$set(e.searchForm,"name",t)},expression:"searchForm.name"}})],1),a("el-form-item",[a("el-button",{attrs:{icon:"el-icon-search",type:"primary","native-type":"submit"},on:{click:e.handleQuery}},[e._v(" 查询 ")]),a("el-button",{attrs:{icon:"el-icon-plus",type:"primary"},on:{click:e.handleAdd}},[e._v(" 添加 ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"tableSort",attrs:{data:e.tableData,"element-loading-text":e.elementLoadingText,height:e.height,"header-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"}}},[e._v(" > "),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"序号",width:"95"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.$index+1)+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"name",label:"名称"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"executeClass",label:"执行类"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"code",label:"编码"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"sor",label:"排序"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"type",label:"类型",formatter:e.formatType}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"description",label:"描述"}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"inCode",label:"所属公司",formatter:e.formatCompany}}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"操作",width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(r)}}},[a("el-tag",{attrs:{type:"success"}},[e._v("编辑")])],1),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.handleDelete(r)}}},[a("el-tag",{attrs:{type:"danger"}},[e._v("删除")])],1)]}}])})],1),a("el-pagination",{attrs:{background:e.background,"current-page":e.page.currentPage,layout:e.layout,"page-size":e.page.pageSize,total:e.page.total},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}}),a("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"500px"},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"===typeof t?t.trim():t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"执行类",prop:"executeClass"}},[a("el-input",{attrs:{disabled:e.typeEdit,autocomplete:"off"},model:{value:e.form.executeClass,callback:function(t){e.$set(e.form,"executeClass","string"===typeof t?t.trim():t)},expression:"form.executeClass"}})],1),a("el-form-item",{attrs:{label:"编码",prop:"code"}},[a("el-input",{attrs:{disabled:e.typeEdit,autocomplete:"off"},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code","string"===typeof t?t.trim():t)},expression:"form.code"}})],1),a("el-form-item",{attrs:{label:"排序",prop:"sor"}},[a("el-input",{attrs:{type:"string",autocomplete:"off"},model:{value:e.form.sor,callback:function(t){e.$set(e.form,"sor","string"===typeof t?t.trim():t)},expression:"form.sor"}})],1),a("el-form-item",{attrs:{label:"类型",prop:"type"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.typeChange},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type","string"===typeof t?t.trim():t)},expression:"form.type"}},e._l(e.types,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"所属公司",prop:"inCode"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择",disabled:e.companyEdit},model:{value:e.form.inCode,callback:function(t){e.$set(e.form,"inCode","string"===typeof t?t.trim():t)},expression:"form.inCode"}},e._l(e.companys,(function(e){return a("el-option",{key:e.code,attrs:{label:e.name,value:e.code}})})),1)],1),a("el-form-item",{attrs:{label:"描述",prop:"description"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.description,callback:function(t){e.$set(e.form,"description","string"===typeof t?t.trim():t)},expression:"form.description"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.close}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.saveOrUpdate()}}},[e._v("确 定")])],1)],1)],1)},o=[],n=a("c7eb"),i=a("1da1"),l=(a("d9e2"),a("ac1f"),a("00b4"),a("e9c4"),a("b0c0"),a("a3d0")),s=a("d3e4"),u={name:"QuartzBase",data:function(){var e=this,t=function(t,a,r){if(!a)return r(new Error("请输入执行类"));Object(l["getExecuteClass"])(e.form.code,a).then((function(t){"edit"===e.dialogType&&r();var a=t.data;null!==a?r(new Error("执行类已存在")):r()}))},a=function(t,a,r){if(!a)return r(new Error("请输入编码"));Object(l["getCode"])(e.form.code,a).then((function(t){"edit"===e.dialogType&&r();var a=t.data;null!==a?r(new Error("编码已存在")):r()}))},r=function(e,t,a){if(!t)return a(new Error("请输入排序"));var r=/^([0-9]+\.?[0-9]*|-[0-9]+\.?[0-9]*)$/.test(t);return r?a():a(new Error("请输入整数"))};return{typeEdit:!1,companyEdit:!1,dialogFormVisible:!1,dialogType:"",title:"",tableData:[],companys:[],searchForm:{code:null,name:null},form:{},types:[{label:"公共",value:"PUBLIC"},{label:"私有",value:"PRIVATE"}],listLoading:!0,layout:"total, sizes, prev, pager, next, jumper",total:0,background:!0,elementLoadingText:"正在加载...",page:{total:0,currentPage:1,pageSize:20},rules:{name:[{required:!0,trigger:"blur",message:"请输入公司名称"}],executeClass:[{required:!0,trigger:"blur",validator:t}],code:[{required:!0,trigger:"blur",validator:a}],type:[{required:!0,trigger:"blur",message:"请输入类型"}],sor:[{required:!0,trigger:"blur",validator:r}]}}},computed:{height:function(){return this.$baseTableHeight()}},created:function(){this.getCompany()},methods:{handleChange:function(e){this.form.sor=e},getCompany:function(){var e=this;Object(s["getCompanyAll"])().then((function(t){e.companys=t.data,e.fetchData(),e.listLoading=!1})).catch((function(){e.listLoading=!1}))},fetchData:function(){var e=this;return Object(i["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.listLoading=!0,Object(l["fetchList"])(Object.assign({current:e.page.currentPage,size:e.page.pageSize},e.searchForm)).then((function(t){e.tableData=t.data.records,e.page.total=t.data.total,e.listLoading=!1})).catch((function(){e.listLoading=!1}));case 2:case"end":return t.stop()}}),t)})))()},handleSizeChange:function(e){this.page.pageSize=e,this.page.currentPage=1,this.fetchData()},handleCurrentChange:function(e){this.page.currentPage=e,this.fetchData()},handleQuery:function(){for(var e in this.searchForm)""==this.searchForm[e]&&delete this.searchForm[e];this.page.currentPage=1,this.fetchData()},close:function(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("fetch-data")},handleAdd:function(){this.typeEdit=!1,this.form={},this.title="新增",this.dialogType="add",this.dialogFormVisible=!0},handleEdit:function(e){this.typeEdit=!0;var t=JSON.parse(JSON.stringify(e));this.form=t,this.title="修改",this.dialogType="edit",this.dialogFormVisible=!0},handleDelete:function(e){var t=this;this.$baseConfirm("你确定要删除当前项吗",null,Object(i["a"])(Object(n["a"])().mark((function a(){var r,o;return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(l["delObj"])(e.id);case 2:r=a.sent,o=r.msg,t.$baseMessage(o,"success"),t.fetchData();case 6:case"end":return a.stop()}}),a)}))))},saveOrUpdate:function(){"add"==this.dialogType?this.save():this.update()},save:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.listLoading=!0,Object(l["addObj"])(e.form).then((function(t){e.dialogFormVisible=!1,e.fetchData(),e.listLoading=!1})).catch((function(){e.listLoading=!1}))}))},update:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.listLoading=!0,console.log(e.form),Object(l["putObj"])(e.form).then((function(t){e.$message({message:"修改成功",type:"success"}),e.dialogFormVisible=!1,e.fetchData(),e.listLoading=!1})).catch((function(){e.$message({message:"修改失败",type:"warning"}),e.listLoading=!1}))}))},formatCompany:function(e,t){for(var a=0;a<this.companys.length;a++)if(e.inCode==this.companys[a].code)return this.companys[a].name},formatType:function(e,t){for(var a=0;a<this.types.length;a++)if(e.type==this.types[a].value)return this.types[a].label},typeChange:function(e){"PUBLIC"==e?(this.$set(this.form,"inCode",null),this.companyEdit=!0):this.companyEdit=!1}}},c=u,d=(a("e1fa"),a("2877")),f=Object(d["a"])(c,r,o,!1,null,null,null);t["default"]=f.exports},8042:function(e,t,a){},a3d0:function(e,t,a){"use strict";a.r(t),a.d(t,"fetchList",(function(){return o})),a.d(t,"addObj",(function(){return n})),a.d(t,"getExecuteClass",(function(){return i})),a.d(t,"getCode",(function(){return l})),a.d(t,"getQuartzBaseAll",(function(){return s})),a.d(t,"getInCode",(function(){return u})),a.d(t,"getChoose",(function(){return c})),a.d(t,"delObj",(function(){return d})),a.d(t,"putObj",(function(){return f}));var r=a("b775");function o(e){return Object(r["default"])({url:"/quartzBase/page",method:"get",params:e})}function n(e){return Object(r["default"])({url:"/quartzBase",method:"post",data:e})}function i(e){return Object(r["default"])({url:"/quartzBase/executeClass/"+e,method:"get"})}function l(e){return Object(r["default"])({url:"/quartzBase/code/"+e,method:"get"})}function s(){return Object(r["default"])({url:"/quartzBase/all",method:"get"})}function u(e){return Object(r["default"])({url:"/quartzBase/inCode/"+e,method:"get"})}function c(e){return Object(r["default"])({url:"/quartzBase/choose/"+e,method:"get"})}function d(e){return Object(r["default"])({url:"/quartzBase/"+e,method:"delete"})}function f(e){return Object(r["default"])({url:"/quartzBase",method:"put",data:e})}},d3e4:function(e,t,a){"use strict";a.r(t),a.d(t,"fetchList",(function(){return o})),a.d(t,"addObj",(function(){return n})),a.d(t,"getObj",(function(){return i})),a.d(t,"getCompanyAll",(function(){return l})),a.d(t,"delObj",(function(){return s})),a.d(t,"putObj",(function(){return u}));var r=a("b775");function o(e){return Object(r["default"])({url:"/integrationCompany/page",method:"get",params:e})}function n(e){return Object(r["default"])({url:"/integrationCompany",method:"post",data:e})}function i(e){return Object(r["default"])({url:"/integrationCompany/"+e,method:"get"})}function l(){return Object(r["default"])({url:"/integrationCompany/all",method:"get"})}function s(e){return Object(r["default"])({url:"/integrationCompany/"+e,method:"delete"})}function u(e){return Object(r["default"])({url:"/integrationCompany",method:"put",data:e})}},e1fa:function(e,t,a){"use strict";a("8042")}}]);
|