You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
17 KiB
1 lines
17 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0552f3a2"],{"0f19":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"dashboard-container"},[r("div",{staticClass:"gva-search-box"},[r("el-form",{ref:"searchForm",attrs:{inline:!0,model:t.searchInfo}},[r("el-form-item",{attrs:{label:"考核维度名称"}},[r("el-input",{attrs:{placeholder:"请输入名称",clearable:""},model:{value:t.searchInfo.title,callback:function(e){t.$set(t.searchInfo,"title",e)},expression:"searchInfo.title"}})],1),r("el-form-item",{attrs:{label:"考核维度状态"}},[r("el-select",{attrs:{clearable:"",placeholder:"请选择状态"},model:{value:t.searchInfo.state,callback:function(e){t.$set(t.searchInfo,"state",e)},expression:"searchInfo.state"}},[r("el-option",{attrs:{value:1,label:"正常"}},[t._v("正常")]),r("el-option",{attrs:{value:2,label:"禁止"}},[t._v("禁止")])],1)],1),r("el-form-item",[r("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-search"},on:{click:t.onSubmit}},[t._v("查询")]),r("el-button",{attrs:{size:"mini",icon:"el-icon-refresh"},on:{click:t.onReset}},[t._v("重置")])],1)],1)],1),r("div",{staticClass:"gva-table-box"},[r("div",{staticClass:"gva-btn-list"},[r("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-plus"},on:{click:function(e){return t.showAdd()}}},[t._v("新增")])],1),r("el-table",{attrs:{data:t.tableData}},[r("el-table-column",{attrs:{align:"left",label:"考核维度ID",prop:"outId"}}),r("el-table-column",{attrs:{align:"left",label:"考核维度名称",prop:"title"}}),r("el-table-column",{attrs:{align:"left",label:"排序",prop:"sort"}}),r("el-table-column",{attrs:{align:"left",label:"考核维度状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-switch",{attrs:{"inline-prompt":"","active-text":"正常","inactive-text":"禁止","active-color":"#13ce66","inactive-color":"#ff4949","active-value":1,"inactive-value":2},on:{change:function(r){return t.changeVal(r,e.row.outId)}},model:{value:e.row.state,callback:function(r){t.$set(e.row,"state",r)},expression:"scope.row.state"}})]}}])}),r("el-table-column",{attrs:{align:"left",fixed:"right",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{icon:"el-icon-edit",size:"small",type:"text"},on:{click:function(r){return t.showEdit(e.row)}}},[t._v("编辑")]),r("el-button",{attrs:{icon:"el-icon-delete",size:"small",type:"text"},on:{click:function(r){return t.deleteOperate(e.row)}}},[t._v("删除")])]}}])})],1),r("div",{staticClass:"gva-pagination"},[r("el-pagination",{attrs:{"page-sizes":[10,30,50,100],"page-size":t.searchInfo.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),r("el-dialog",{attrs:{visible:t.dialogFormVisible,"before-close":t.closeDialog,title:"新增",width:"20%"},on:{"update:visible":function(e){t.dialogFormVisible=e}},scopedSlots:t._u([{key:"footer",fn:function(){return[r("div",{staticClass:"dialog-footer"},[r("el-button",{attrs:{size:"small"},on:{click:t.closeDialog}},[t._v("取 消")]),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.enterDialog}},[t._v("确 定")])],1)]},proxy:!0}])},[r("el-form",{ref:"addForm",attrs:{model:t.form,rules:t.rules,"label-width":"150px"}},[r("el-form-item",{attrs:{label:"考核维度名称",prop:"title"}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),r("el-form-item",{attrs:{label:"排序",prop:"sort"}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort",t._n(e))},expression:"form.sort"}})],1)],1)],1),r("el-dialog",{attrs:{visible:t.editDialogFormVisible,"before-close":t.editCloseDialog,title:"修改",width:"20%"},on:{"update:visible":function(e){t.editDialogFormVisible=e}},scopedSlots:t._u([{key:"footer",fn:function(){return[r("div",{staticClass:"dialog-footer"},[r("el-button",{attrs:{size:"small"},on:{click:t.editCloseDialog}},[t._v("取 消")]),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.editEnterDialog}},[t._v("确 定")])],1)]},proxy:!0}])},[r("el-form",{ref:"editForm",attrs:{model:t.editAdd,rules:t.editRules,"label-width":"150px"}},[r("el-form-item",{attrs:{label:"考核维度名称",prop:"title"}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:t.editAdd.title,callback:function(e){t.$set(t.editAdd,"title",e)},expression:"editAdd.title"}})],1),r("el-form-item",{attrs:{label:"排序",prop:"sort"}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:t.editAdd.sort,callback:function(e){t.$set(t.editAdd,"sort",t._n(e))},expression:"editAdd.sort"}})],1)],1)],1)],1)},o=[],i=r("febe"),a=(r("cf33"),r("bab0"),r("e186"),r("b6be")),s={name:"Dashboard",data:function(){return{editFrom:{},switchFrom:{},deleFrom:{},editAdd:{},assessList:{},form:{},dialogFormVisible:!1,editDialogFormVisible:!1,total:0,tableData:[],searchInfo:{page:1,pagesize:10},abc:{aaa:"111",bbb:"222"},rules:{title:[{required:!0,message:"请输入名称",trigger:"blur"}]},editRules:{title:[{required:!0,message:"请输入名称",trigger:"blur"}]}}},created:function(){console.log(this.$store.state.user.token),""==this.$store.state.user.token&&this.$router.push("/login"),this.getDataList()},methods:{deleteOperate:function(t){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:e.$confirm("此操作将永久删除, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(i["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return e.deleFrom.state=3,e.deleFrom.outid=t.outId,r.next=4,Object(a["e"])(e.deleFrom);case 4:n=r.sent,0===n.code&&(e.$message({type:"success",message:"删除成功!"}),e.getDataList());case 6:case"end":return r.stop()}}),r)}))));case 1:case"end":return r.stop()}}),r)})))()},showAdd:function(){this.dialogFormVisible=!0,console.log(this.dialogFormVisible)},showEdit:function(t){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return e.editFrom.outid=t.outId,r.next=3,Object(a["d"])(e.editFrom);case 3:n=r.sent,e.editAdd=n.data,e.editDialogFormVisible=!0;case 6:case"end":return r.stop()}}),r)})))()},changeVal:function(t,e){var r=this;return Object(i["a"])(regeneratorRuntime.mark((function n(){var o,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(console.log(t),r.switchFrom.outid=e,1!=t){n.next=10;break}return r.switchFrom.state=1,n.next=6,Object(a["e"])(r.switchFrom);case 6:o=n.sent,0===o.code&&(r.$message({type:"success",message:"修改状态成功",showClose:!0}),r.getDataList()),n.next=15;break;case 10:return r.switchFrom.state=2,n.next=13,Object(a["e"])(r.switchFrom);case 13:i=n.sent,0===i.code&&(r.$message({type:"success",message:"修改状态成功",showClose:!0}),r.getDataList());case 15:case"end":return n.stop()}}),n)})))()},onReset:function(){this.searchInfo={}},onSubmit:function(){this.page=1,this.pageSize=10,this.getDataList()},formatDate:function(t){return new Date(1e3*parseInt(t)).toLocaleString().replace(/:\d{1,2}$/," ")},enterDialog:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$refs.addForm.validate(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=7;break}return e.next=3,Object(a["a"])(t.form);case 3:n=e.sent,0===n.code&&t.$message({type:"success",message:"添加成功",showClose:!0}),t.getDataList(),t.closeDialog();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))()},editEnterDialog:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$refs.editForm.validate(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=7;break}return e.next=3,Object(a["c"])(t.editAdd);case 3:n=e.sent,0===n.code&&t.$message({type:"success",message:"编辑成功",showClose:!0}),t.getDataList(),t.editCloseDialog();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))()},closeDialog:function(){console.log("closeDialog"),this.initForm(),this.dialogFormVisible=!1},editCloseDialog:function(){this.editInitForm(),this.editDialogFormVisible=!1},initForm:function(){console.log("initForm"),this.$refs.addForm.resetFields(),this.form={},console.log(this.form)},editInitForm:function(){this.$refs.editForm.resetFields(),this.editAdd={}},handleSizeChange:function(t){this.searchInfo.pagesize=t,this.getDataList(this.searchInfo)},handleCurrentChange:function(t){this.searchInfo.page=t,this.getDataList(this.searchInfo)},getDataList:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(a["b"])(t.searchInfo);case 2:r=e.sent,t.tableData=r.data.list,t.total=r.data.total,t.searchInfo.page=r.data.page,t.searchInfo.pagesize=r.data.pageSize;case 7:case"end":return e.stop()}}),e)})))()}}},c=s,l=(r("8364"),r("cba8")),u=Object(l["a"])(c,n,o,!1,null,"951e1a82",null);e["default"]=u.exports},"7efc":function(t,e,r){},8364:function(t,e,r){"use strict";r("7efc")},b6be:function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return a})),r.d(e,"c",(function(){return s})),r.d(e,"e",(function(){return c}));var n=r("b775"),o=function(t){return Object(n["a"])({url:"/duty/dutyclasslist",method:"post",data:t})},i=function(t){return Object(n["a"])({url:"/duty/adddutyclass",method:"post",data:t})},a=function(t){return Object(n["a"])({url:"/duty/getdutyclassinfo",method:"post",data:t})},s=function(t){return Object(n["a"])({url:"/duty/eitedutyclassinfo",method:"post",data:t})},c=function(t){return Object(n["a"])({url:"/duty/statedutyclass",method:"post",data:t})}},e186:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch($){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),a=new I(n||[]);return i._invoke=O(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch($){return{type:"throw",arg:$}}}t.wrap=l;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",m={};function g(){}function v(){}function b(){}var y={};c(y,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(E([])));x&&x!==r&&n.call(x,i)&&(y=x);var k=b.prototype=g.prototype=Object.create(y);function F(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,s){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var o;function i(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function O(t,e,r){var n=f;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return R()}r.method=o,r.arg=i;while(1){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(t,e,r);if("normal"===c.type){if(n=r.done?p:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}function j(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=u(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function E(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){while(++o<t.length)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:R}}function R(){return{value:e,done:!0}}return v.prototype=b,c(k,"constructor",b),c(b,"constructor",v),v.displayName=c(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},F(L.prototype),c(L.prototype,a,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new L(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},F(k),c(k,s,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=n}catch(o){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},febe:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r("e456");function n(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(l){return void r(l)}s.done?e(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function s(t){n(a,o,i,s,c,"next",t)}function c(t){n(a,o,i,s,c,"throw",t)}s(void 0)}))}}}}]);
|