提交 11ff5a33 编写于 作者: 符英鹏's avatar 符英鹏 🏀

feat:'完成'

上级 dabf28b5
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
.top-condition[data-v-ba2301b4]{display:flex}[data-v-ba2301b4] .ivu-checkbox-group-item{margin-bottom:10px}
\ No newline at end of file
[data-v-364e43c7] .ivu-checkbox-group-item{margin-bottom:8px}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>日常行为反馈</title><link href=css/chunk-vendors.cc1990b1.css rel=stylesheet><link href=css/app.4b3af228.css rel=stylesheet></head><body><noscript><strong>请开启 JavaScript 功能来使用 值班管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.4ff6b6ff.js></script><script src=js/app.754246d9.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>日常行为反馈</title><link href=css/chunk-vendors.cc1990b1.css rel=stylesheet><link href=css/app.a786022a.css rel=stylesheet></head><body><noscript><strong>请开启 JavaScript 功能来使用 值班管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.4ff6b6ff.js></script><script src=js/app.2bfbfba4.js></script></body></html>
\ No newline at end of file \ No newline at end of file
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-192652d8"],{5834:function(e,t,n){"use strict";n.r(t);n("7f7f");var a=function(){var e=this,t=e._self._c;return t("div",[t("Card",{ref:"card",staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[t("div",{staticClass:"top-condition"},[t("Input",{staticStyle:{width:"250px","margin-bottom":"5px"},attrs:{placeholder:"请输入关键字",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.doSearch.apply(null,arguments)}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}}),t("Button",{staticStyle:{margin:"0 10px"},attrs:{type:"primary"},on:{click:e.doSearch}},[e._v("查找")]),t("Button",{attrs:{type:"primary",ghost:"",icon:"md-add"},on:{click:function(t){e.userModal=!0}}},[e._v("\n 添加权限\n ")])],1),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.tableData,loading:e.loading},scopedSlots:e._u([{key:"role_info",fn:function(n){var a=n.row;return e._l(a.role_info,(function(e,n){return t("p",{key:n},[t("Badge",{staticClass:"ivu-mb-8",attrs:{color:"管理员"==e.name?"orange":"blue",text:e.name}})],1)}))}},{key:"action",fn:function(n){var a=n.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("Divider",{attrs:{type:"vertical"}}),t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleDelete(a.id)}}},[e._v("删除")])],1)]}}])}),t("div",{staticClass:"ivu-mt ivu-text-center"},[t("Page",{attrs:{total:e.total,current:e.pageIndex,"show-total":"","show-sizer":"","show-elevator":"","page-size":e.pageSize,"page-size-opts":[10,30,50,100]},on:{"update:current":function(t){e.pageIndex=t},"on-change":e.handleChangePage,"on-page-size-change":e.handleChangePageSize}})],1)],1),t("Modal",{attrs:{title:"编辑权限",loading:e.modalLoading,width:"30%"},on:{"on-ok":e.saveEdit,"on-cancel":e.handleCancel},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[t("CheckboxGroup",{model:{value:e.userRole,callback:function(t){e.userRole=t},expression:"userRole"}},e._l(e.allRole,(function(n){return t("Checkbox",{key:n.id,attrs:{label:n.id,border:""}},[e._v(e._s(n.name))])})),1)],1),t("Modal",{attrs:{title:"添加权限",loading:e.modalLoading,width:"50"},on:{"on-ok":e.handleAdd},model:{value:e.userModal,callback:function(t){e.userModal=t},expression:"userModal"}},[t("Form",{ref:"form",attrs:{model:e.formData,rules:e.formRule,"label-width":150}},[t("FormItem",{attrs:{label:"选择人员"}},[t("Select",{attrs:{filterable:""},model:{value:e.selectUser,callback:function(t){e.selectUser=t},expression:"selectUser"}},e._l(e.peopleOption,(function(n){return t("Option",{key:n.id,attrs:{value:n.id,label:n.name}},[t("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[t("p",[e._v(e._s(n.name)+"\n "),t("span",{staticStyle:{color:"#9a9a9a"}},[e._v("("+e._s(n.card)+")")])]),t("p",{staticStyle:{color:"#ccc"}},[e._v(e._s(n.dept_name))])])])})),1)],1),t("FormItem",{attrs:{label:"选择权限"}},[t("CheckboxGroup",{model:{value:e.userRole,callback:function(t){e.userRole=t},expression:"userRole"}},e._l(e.allRole,(function(n){return t("Checkbox",{key:n.id,attrs:{label:n.id,border:""}},[e._v(e._s(n.name))])})),1)],1)],1)],1)],1)},o=[],i=(n("8e6e"),n("ac6a"),n("456d"),n("ade3")),r=(n("7514"),n("28a5"),n("7274")),l=n("e191");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){Object(i["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={data:function(){return{loading:!1,modal:!1,modalLoading:!0,searchValue:"",tableData:[],columns:[{type:"index",align:"center",width:60},{title:"卡号",key:"card",width:200},{title:"姓名",key:"name",width:200},{title:"角色",slot:"role_info"},{title:"操作",slot:"action",align:"center",width:150}],pageIndex:1,pageSize:10,total:0,allRole:[],userRole:[],cardNumber:"",editRow:{},userModal:!1,formData:{},formRule:{},peopleOption:[],selectUser:""}},created:function(){this.getData(),this.getRoleList(),this.GetPersonByCondiction()},methods:{getData:function(){var e=this,t={page_index:this.pageIndex,page_size:this.pageSize,key_name:this.searchValue};this.loading=!0,r["g"](t).then((function(t){e.loading=!1,e.tableData=t.data,e.total=t.data_count}))},getRoleList:function(){var e=this;r["f"]().then((function(t){e.allRole=t}))},doSearch:function(){this.pageIndex=1,this.getData()},handleChangePage:function(e){this.pageIndex=e,this.getData()},handleChangePageSize:function(e){this.pageIndex=1,this.pageSize=e,this.getData()},handleEdit:function(e){this.editRow=e,this.modal=!0,e.role_info.length&&(this.userRole=e.role_id.split(";"))},saveEdit:function(){var e=this,t=[];this.userRole.map((function(n){t.push(e.allRole.find((function(e){return e.id==n})))}));var n=c(c({},this.editRow),{},{role_id:this.userRole.join(","),role_info:t});r["z"](n).then((function(t){e.handleModalLoading(),e.modal=!1,e.$Message.success("添加成功"),e.userRole=[],e.getData()})).catch((function(){e.handleModalLoading()}))},handleCancel:function(){this.userRole=[]},GetPersonByCondiction:function(){var e=this,t={page_index:1,page_size:1e4};Object(l["c"])(t).then((function(t){e.peopleOption=t.data}))},handleAdd:function(){var e=this,t=[];this.userRole.map((function(n){t.push(e.allRole.find((function(e){return e.id==n})))}));var n={userid:this.selectUser,role_id:this.userRole.join(","),role_info:t};r["z"](n).then((function(t){e.handleModalLoading(),e.userModal=!1,e.$Message.success("添加成功"),e.getData()})).catch((function(){e.handleModalLoading()}))},handleModalLoading:function(){var e=this;this.modalLoading=!1,this.$nextTick((function(){e.modalLoading=!0}))},handleDelete:function(e){var t=this;this.$Modal.confirm({title:"确定要删除吗?",loading:!0,onOk:function(){var n={id:e,is_del:1};r["y"](n).then((function(){t.$Modal.remove(),t.$Message.success("删除成功"),t.getData()}))}})}}},u=d,h=(n("e4b0"),n("2877")),p=Object(h["a"])(u,a,o,!1,null,"ba2301b4",null);t["default"]=p.exports},6489:function(e,t,n){},e191:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r}));var a=n("b6bd");function o(e){return Object(a["a"])({url:"/api/DutyRecord/GetDutyArrangeByDateList",method:"get",params:e})}function i(e){return Object(a["a"])({url:"/api/Common/GetPersonByCondiction",method:"get",params:e})}function r(e){return Object(a["a"])({url:"/api/DutyRecord/DutyArrangeIns",method:"post",data:e})}},e4b0:function(e,t,n){"use strict";n("6489")}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c5d0d63"],{"16cf":function(e,t,n){"use strict";n("36fb")},"1dac":function(e,t,n){},3408:function(e,t,n){},"351e":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e._self._c;return t("div",[t("Row",{attrs:{gutter:24}},[t("Col",{attrs:{xl:6,lg:6,md:0,sm:0,xs:0}},[t("Card",{attrs:{shadow:"",title:"通用设置",icon:"md-options",padding:0}},[t("CellGroup",{staticClass:"ivu-pt-8 ivu-pb-8",on:{"on-click":e.handleChangeCell}},[t("Cell",{attrs:{title:"1、反馈类型",name:"type",label:"反馈类型选项的设置",selected:"type"===e.currentType}}),t("Cell",{attrs:{title:"2、表单管理",name:"fields",label:"自定义表单的字段",selected:"fields"===e.currentType}}),t("Cell",{attrs:{title:"3、人员选择器",name:"selector",label:"移动端人员选择器配置",selected:"selector"===e.currentType}}),t("Cell",{attrs:{title:"4、其他",name:"other",label:"是否公开,消息提醒,角色操作等配置",selected:"other"===e.currentType}})],1)],1)],1),t("Col",{attrs:{xl:18,lg:18,md:24,sm:24,xs:24}},[t("Card",{attrs:{bordered:!1,"dis-hover":""}},[t("Row",[t("Col",{attrs:{xl:0,lg:0,md:24,sm:24,xs:24}},[t("Tabs",{attrs:{value:e.currentType},on:{"on-click":e.handleChangeCell}},[t("TabPane",{attrs:{label:"反馈表单",name:"fields"}}),t("TabPane",{attrs:{label:"反馈类型",name:"type"}}),t("TabPane",{attrs:{label:"人员选择器",name:"selector"}}),t("TabPane",{attrs:{label:"其他",name:"other"}})],1)],1)],1),"fields"===e.currentType?t("fields"):e._e(),"type"===e.currentType?t("type"):e._e(),"selector"===e.currentType?t("Selector"):e._e(),"other"===e.currentType?t("OtherSetting"):e._e()],1)],1)],1)],1)},a=[],i=(n("7f7f"),function(){var e=this,t=e._self._c;return t("div",[t("Tabs",{on:{"on-click":e.tabsChange},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.tabs,(function(n){return t("TabPane",{key:n.name,attrs:{label:n.label,name:n.name}},[t("Table",{ref:"table",refInFor:!0,staticClass:"ivu-mt",attrs:{border:"",loading:e.loading,columns:e.columns,data:e.list},scopedSlots:e._u([{key:"showType",fn:function(t){var n=t.row;return[e._v("\n "+e._s("Radio"===n.showType?"单选":"文本")+"\n ")]}},{key:"showFlag",fn:function(n){var o=n.row;return[0===o.showFlag?t("Tag",{attrs:{color:"default"}},[e._v("隐藏")]):t("Tag",{attrs:{color:"success"}},[e._v("显示")])]}},{key:"required",fn:function(t){var n=t.row;return[e._v("\n "+e._s(1===n.required?"必填":"选填")+"\n ")]}},{key:"options",fn:function(t){var n=t.row;return[e._v("\n "+e._s(n.options?n.options.join(" / "):"")+"\n ")]}},{key:"action",fn:function(n){var o=n.row,a=n.index;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(o,a)}}},[e._v("编辑")])])]}}],null,!0)}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")]),t("div",{staticStyle:{"text-align":"center"}},[t("Button",{attrs:{type:"primary",loading:e.saveLoading},on:{click:e.update}},[e._v("\n 保存修改\n ")])],1)],1):e._e()],1)})),1),t("Modal",{staticClass:"add-modal",attrs:{width:"40%",title:"修改字段"},on:{"on-ok":e.confirmEdit},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[t("Form",{ref:"form",attrs:{model:e.formData,rules:e.formRule,"label-width":80}},[t("FormItem",{attrs:{label:"字段名称",prop:"name"}},[t("Input",{attrs:{placeholder:"请输入字段名称"},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),"item"===e.formData.id?t("FormItem",{attrs:{label:"字段类型",prop:"showType"}},[t("RadioGroup",{model:{value:e.formData.showType,callback:function(t){e.$set(e.formData,"showType",t)},expression:"formData.showType"}},[t("Radio",{attrs:{label:"Text"}},[e._v("文本")]),t("Radio",{attrs:{label:"Radio"}},[e._v("单选")])],1)],1):e._e(),t("FormItem",{attrs:{label:"是否隐藏",prop:"showFlag"}},[[t("i-switch",{attrs:{size:"large",trueValue:1,falseValue:0},model:{value:e.formData.showFlag,callback:function(t){e.$set(e.formData,"showFlag",t)},expression:"formData.showFlag"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("隐藏")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("显示")])])]],2),t("FormItem",{attrs:{label:"是否必填",prop:"required"}},[[t("i-switch",{attrs:{size:"large",trueValue:1,falseValue:0},model:{value:e.formData.required,callback:function(t){e.$set(e.formData,"required",t)},expression:"formData.required"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("必填")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("选填")])])]],2),t("FormItem",{attrs:{label:"描述",prop:"description"}},[t("Input",{attrs:{placeholder:"请输入占位文本"},model:{value:e.formData.description,callback:function(t){e.$set(e.formData,"description",t)},expression:"formData.description"}})],1),"item"===e.formData.id||"address"==e.formData.id?t("FormItem",{attrs:{label:"选项",prop:"options"}},[e._l(e.formData.options,(function(n,o){return t("Tag",{key:o,attrs:{name:o,closable:"",size:"large"},on:{"on-close":function(t){return e.handleDel(o)}}},[e._v(e._s(n)+"\n ")])})),t("Button",{staticClass:"ivu-ml-8",attrs:{type:"dashed",icon:"md-add"},on:{click:e.handleAdd}},[e._v("\n 添加\n ")])],2):e._e()],1)],1)],1)}),l=[],s=n("2909"),r=n("7274"),c={data:function(){return{columns:[{type:"index",width:60,align:"center"},{title:"ID",key:"id",width:150},{key:"name",title:"字段名称",minWidth:150},{key:"showType",slot:"showType",title:"字段类型",minWidth:100},{key:"showFlag",slot:"showFlag",title:"显示/隐藏",minWidth:100},{key:"required",slot:"required",title:"必填/选填",minWidth:100},{key:"description",title:"描述",minWidth:150},{key:"options",slot:"options",title:"选项",minWidth:200},{title:"操作",slot:"action",align:"center",fixed:"right",width:80}],loading:!1,saveLoading:!1,list:[],rechristenIndex:void 0,rechristenValue:void 0,tipsFlag:!1,tabs:[{label:"反馈填报表单",name:"AddFormField"},{label:"转办填报表单",name:"TransferFormField"},{label:"回复表单",name:"ReplyFormField"}],activeTab:"AddFormField",descriptionInput:"",isEditIndex:void 0,modal:!1,modalLoading:!0,editIndex:void 0,formData:{showFlag:!0,name:"",description:"",showType:"",required:!0,options:[]},formRule:{name:[{required:!0,message:"请输入名称",trigger:"blur"}]}}},created:function(){this.getData()},methods:{getData:function(){var e=this;this.list=[],this.loading||(this.loading=!0,Object(r["e"])({type:this.activeTab}).then((function(t){e.list=t,e.loading=!1})))},changeRequired:function(e,t){this.list[t._index].required=e?1:0,this.tipsFlag=!0},changeShowFlag:function(e,t){this.list[t._index].showFlag=e?1:0,this.val||(this.list[t._index].required=0),this.tipsFlag=!0},orderby:function(e,t){var n;(n=this.list).splice.apply(n,[e,1].concat(Object(s["a"])(this.list.splice("up"===t?e-1:e+1,1,this.list[e])))),this.tipsFlag=!0},handleRechristen:function(e,t){this.rechristenValue=e,this.rechristenIndex=t},confirmRechristen:function(e){this.list[e].name=this.rechristenValue,this.rechristenValue=this.rechristenIndex=void 0,this.tipsFlag=!0},update:function(){var e=this;this.saveLoading=!0,this.rechristenValue=this.rechristenIndex=void 0,Object(r["f"])(this.list,this.activeTab).then((function(){e.$Message.success("修改成功"),e.saveLoading=e.tipsFlag=!1})).catch((function(){e.$Message.error("修改失败"),e.saveLoading=e.tipsFlag=!1,e.getData()}))},tabsChange:function(){this.tipsFlag=!1,this.descriptionInput="",this.descriptionInput=this.isEditIndex=void 0,this.getData()},handleEdit:function(e,t){this.formData=JSON.parse(JSON.stringify(e)),this.modal=!0,this.editIndex=t},handleDel:function(e){this.formData.options.splice(e,1)},handleAdd:function(){var e=this,t="";this.$Modal.confirm({render:function(e){return e("Input",{props:{value:t,autofocus:!0,placeholder:"请输入选项"},on:{input:function(e){t=e}}})},onOk:function(){""==e.value?e.$Message.info("请输入选项"):(e.formData.options||(e.formData.options=[]),e.formData.options.push(t))}})},confirmEdit:function(){var e=this;this.$refs["form"].validate((function(t){t&&(e.$set(e.list,e.editIndex,e.formData),e.modal=!1,e.tipsFlag=!0)}))}}},d=c,u=n("2877"),p=Object(u["a"])(d,i,l,!1,null,null,null),h=p.exports,b=function(){var e=this,t=e._self._c;return t("div",[t("h2",[e._v("反馈类型")]),t("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t("Button",{attrs:{type:"primary",ghost:"",icon:"md-add"},on:{click:e.handleOpenCreate}},[e._v("\n 添加分类\n ")]),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.list,loading:e.loading},scopedSlots:e._u([{key:"enable_status",fn:function(n){var o=n.row;return[t("i-switch",{attrs:{"true-color":"#52c41a","false-color":"#cccccc",size:"large",disabled:e.disabled},on:{"on-change":function(t){return e.handleChanget(t,o)}},model:{value:1===o.enable_status,callback:function(t){e.$set(o,"enable_status === 1",t)},expression:"row.enable_status === 1"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("启用")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("停用")])])]}},{key:"action",fn:function(n){var o=n.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(o)}}},[e._v("编辑")]),t("Divider",{attrs:{type:"vertical"}}),t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleDel(o.id)}}},[e._v("删除")])],1)]}},{key:"orderby",fn:function(n){var o=n.index;return[t("ButtonGroup",[t("Button",{attrs:{disabled:0===o,icon:"md-arrow-up"},on:{click:function(t){return e.orderby(o,"up")}}}),t("Button",{attrs:{disabled:o===e.list.length-1,icon:"md-arrow-down"},on:{click:function(t){return e.orderby(o,"down")}}})],1)]}}])})],1),t("Modal",{attrs:{title:"添加分类",loading:e.modalLoading},on:{"on-ok":e.handleAdd},model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[t("Form",{ref:"addForm",attrs:{model:e.addForm,"label-position":"right","label-width":100,rules:e.ruleValidate}},[t("FormItem",{attrs:{label:"加减分",prop:"add_or_reduce"}},[t("Select",{model:{value:e.addForm.add_or_reduce,callback:function(t){e.$set(e.addForm,"add_or_reduce",t)},expression:"addForm.add_or_reduce"}},e._l(e.options,(function(n){return t("Option",{key:n.id,attrs:{value:n.id}},[e._v(e._s(n.label))])})),1)],1),t("FormItem",{attrs:{label:"行为类型",prop:"type_name"}},[t("Input",{model:{value:e.addForm.type_name,callback:function(t){e.$set(e.addForm,"type_name",t)},expression:"addForm.type_name"}})],1),t("FormItem",{attrs:{label:"行为描述"}},[t("Input",{model:{value:e.addForm.type_desc,callback:function(t){e.$set(e.addForm,"type_desc",t)},expression:"addForm.type_desc"}})],1),t("FormItem",{attrs:{label:"行为得分"}},[t("InputNumber",{model:{value:e.addForm.score,callback:function(t){e.$set(e.addForm,"score",t)},expression:"addForm.score"}})],1)],1)],1),t("Modal",{attrs:{title:"编辑分类",loading:e.modalLoading},on:{"on-ok":e.confirmEdit},model:{value:e.showEditModal,callback:function(t){e.showEditModal=t},expression:"showEditModal"}},[t("Form",{ref:"editForm",attrs:{model:e.editForm,"label-position":"right","label-width":100,rules:e.ruleValidate}},[t("FormItem",{attrs:{label:"加减分",prop:"add_or_reduce"}},[t("Select",{model:{value:e.editForm.add_or_reduce,callback:function(t){e.$set(e.editForm,"add_or_reduce",t)},expression:"editForm.add_or_reduce"}},e._l(e.options,(function(n){return t("Option",{key:n.id,attrs:{value:n.id}},[e._v(e._s(n.label))])})),1)],1),t("FormItem",{attrs:{label:"行为类型",prop:"type_name"}},[t("Input",{model:{value:e.editForm.type_name,callback:function(t){e.$set(e.editForm,"type_name",t)},expression:"editForm.type_name"}})],1),t("FormItem",{attrs:{label:"行为描述"}},[t("Input",{model:{value:e.editForm.type_desc,callback:function(t){e.$set(e.editForm,"type_desc",t)},expression:"editForm.type_desc"}})],1),t("FormItem",{attrs:{label:"行为得分"}},[t("InputNumber",{model:{value:e.editForm.score,callback:function(t){e.$set(e.editForm,"score",t)},expression:"editForm.score"}})],1)],1)],1)],1)},y=[],m=(n("8e6e"),n("ac6a"),n("456d"),n("ade3"));function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){Object(m["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={data:function(){return{columns:[],loading:!1,disabled:!1,list:[],total:0,value:"",pageIndex:1,pageSize:20,showModal:!1,showEditModal:!1,addForm:{add_or_reduce:"",type_name:"",type_desc:"",score:0},editForm:{add_or_reduce:"",type_name:"",type_desc:"",score:0},options:[],modalLoading:!0,ruleValidate:{add_or_reduce:[{required:!0,message:"请选择加减分",trigger:"change"}],type_name:[{required:!0,message:"请填写行为类型",trigger:"blur"}]},row:{}}},computed:{},created:function(){this.getData(),this.AddOrReduceList()},methods:{getData:function(){var e=this;if(!this.loading){this.loading=!0;var t={pageIndex:this.pageIndex,pageSize:this.pageSize,keyWord:""};Object(r["l"])(t).then((function(t){e.list=t.data,e.total=t.dataCount,e.loading=!1,e.columns.length<=0&&(e.columns=[{type:"index",width:80,align:"center",title:"序号"}],t.title.map((function(t){var n={};1==t.order_by_flag&&Object.assign(n,{sortable:"custom"}),1==t.show_type?Object.assign(n,{slot:t.field_id,title:t.show_name}):Object.assign(n,{key:t.field_id,title:t.show_name}),e.columns.push(n)})),e.columns.push({title:"操作",slot:"action"}))}))}},handleOpenCreate:function(){this.showModal=!0},handleEdit:function(e){this.editForm.type_name=e.type_name,this.editForm.type_desc=e.type_desc,this.editForm.add_or_reduce=e.add_or_reduce,this.editForm.score=e.score,this.row=e,this.showEditModal=!0},handleChanget:function(e,t){var n=this;this.disabled||(this.disabled=!0,Object(r["k"])(t.id).then((function(){n.$Message.success("修改成功"),n.disabled=!1})).catch((function(){n.disabled=!1})))},orderby:function(e,t){var n=this,o={};switch(t){case"up":o={one:this.list[e-1].id,two:this.list[e].id};break;case"down":o={one:this.list[e].id,two:this.list[e+1].id};break}Object(r["m"])(o).then((function(){var o;(o=n.list).splice.apply(o,[e,1].concat(Object(s["a"])(n.list.splice("up"===t?e-1:e+1,1,n.list[e]))))}))},handleDel:function(e){var t=this;this.$Modal.confirm({title:"确定要删除吗?",onOk:function(){Object(r["j"])(e).then((function(){t.$Message.success("删除成功"),t.getData()}))}})},AddOrReduceList:function(){var e=this;Object(r["a"])().then((function(t){e.options=t}))},handleAdd:function(){var e=this;this.$refs.addForm.validate((function(t){t?Object(r["i"])(e.addForm).then((function(t){e.handleModalLoading(),e.showModal=!1,e.$Message.success("添加成功"),e.getData()})).catch((function(){e.handleModalLoading()})):(e.handleModalLoading(),e.$Message.error("表单校验不通过"))}))},confirmEdit:function(){var e=this;this.$refs.editForm.validate((function(t){if(t){var n=v(v({},e.editForm),{},{id:e.row.id});Object(r["n"])(n).then((function(t){e.handleModalLoading(),e.showEditModal=!1,e.$Message.success("编辑成功"),e.getData()})).catch((function(){e.handleModalLoading()}))}else e.handleModalLoading(),e.$Message.error("表单校验不通过")}))},handleModalLoading:function(){var e=this;this.modalLoading=!1,this.$nextTick((function(){e.modalLoading=!0}))}}},_=g,T=(n("5430"),Object(u["a"])(_,b,y,!1,null,null,null)),k=T.exports,w=function(){var e=this,t=e._self._c;return t("div",[t("h2",[e._v("模板配置")]),t("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[t("Upload",{attrs:{multiple:"",action:"/feedback/api/Config/ExportTemplate/Upload","before-upload":e.handleUpload,"on-success":e.handleSuccess,"show-upload-list":!1,headers:{Authorization:e.token},format:["docx"],"on-format-error":e.handleFormatError}},[t("Button",{attrs:{type:"primary",ghost:"",icon:"ios-cloud-upload-outline"}},[e._v("\n 模板上传\n ")])],1),t("div",[t("Button",{staticStyle:{"margin-right":"20px"},attrs:{type:"primary"},on:{click:e.handleCheckField}},[e._v("\n 模板字段查看\n ")]),t("Button",{attrs:{type:"primary",disabled:!e.tipsFlag},on:{click:e.doSave}},[e._v("\n 保存\n ")])],1)],1),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.tableData,loading:e.loading},scopedSlots:e._u([{key:"name",fn:function(n){var o=n.row,a=n.index;return[e.isEditIndex!==a?t("div",[t("a",{staticClass:"formwork-name",on:{click:function(t){return e.handleDownload(o)}}},[e._v(e._s(o.name))]),t("Button",{staticStyle:{color:"#515a6e"},attrs:{ghost:"",type:"text",size:"small",icon:"ios-create-outline"},on:{click:function(t){return e.handleEdit(o.name,a)}}})],1):t("div",[t("Input",{attrs:{placeholder:"请输入模板名称"},model:{value:e.formWorkName,callback:function(t){e.formWorkName=t},expression:"formWorkName"}},[t("Button",{attrs:{slot:"append",icon:"md-checkmark"},on:{click:function(t){return e.confirmEdit(a)}},slot:"append"})],1)],1)]}},{key:"useFlag",fn:function(n){var o=n.row;return[t("i-switch",{attrs:{"true-color":"#52c41a","true-value":1,"false-value":0,"false-color":"#cccccc",size:"large"},on:{"on-change":function(t){return e.handleChanget(t,o)}},model:{value:o.useFlag,callback:function(t){e.$set(o,"useFlag",t)},expression:"row.useFlag"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("启用")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("停用")])])]}},{key:"action",fn:function(n){var o=n.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("Button",{attrs:{type:"primary",icon:"ios-eye-outline",size:"small"},on:{click:function(t){return e.handlePreview(o)}}},[e._v("预览")]),t("Divider",{attrs:{type:"vertical"}}),t("Button",{attrs:{type:"error",icon:"ios-trash-outline",size:"small"},on:{click:function(t){return e.handleDelete(o)}}},[e._v("删除")])],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")])],1):e._e()],1),t("Drawer",{attrs:{closable:!1,width:"70%"},model:{value:e.previewVisible,callback:function(t){e.previewVisible=t},expression:"previewVisible"}},[t("div",{staticStyle:{display:"flex","align-items":"center"},attrs:{slot:"header"},slot:"header"},[t("h3",{staticStyle:{"margin-right":"20px"}},[e._v("模板预览")]),t("Select",{staticStyle:{width:"200px"},on:{"on-change":e.selectChange},model:{value:e.withData,callback:function(t){e.withData=t},expression:"withData"}},e._l(e.cityList,(function(n){return t("Option",{key:n.value,attrs:{value:n.value}},[e._v(e._s(n.label))])})),1)],1),t("iframe",{staticStyle:{width:"100%",height:"100%"},attrs:{src:e.previewUrl}})]),t("Modal",{attrs:{title:"待处理人",width:"50%"},on:{"on-ok":function(t){e.fieldModal=!1}},model:{value:e.fieldModal,callback:function(t){e.fieldModal=t},expression:"fieldModal"}},[t("Table",{ref:"table",attrs:{loading:e.fieldLoading,columns:e.fieldColumns,data:e.fieldTableData,"max-height":"600"}})],1)],1)},x=[],C=n("c276"),F={data:function(){return{columns:[{type:"index",width:60,align:"center"},{title:"模板名称",key:"name",slot:"name",minWidth:140},{title:"状态",key:"useFlag",slot:"useFlag",minWidth:140},{title:"操作",key:"action",slot:"action",minWidth:150,align:"center"}],loading:!1,tableData:[],isEditIndex:void 0,formWorkName:"",value:"",token:"",tipsFlag:!1,previewVisible:!1,previewUrl:"",withData:0,cityList:[{value:0,label:"不填充数据"},{value:1,label:"填充数据"}],row:{},fieldModal:!1,fieldLoading:!1,fieldColumns:[{type:"index",width:60,align:"center"},{key:"value",title:"字段值"},{key:"label",title:"字段名"}],fieldTableData:[]}},computed:{},created:function(){this.getTemplateList(),this.token="Bearer "+C["a"].cookies.get("token")},methods:{getTemplateList:function(){var e=this;this.loading=!0,r["I"]().then((function(t){e.loading=!1,e.tableData=t}))},handlePreview:function(e){var t=this;e&&(this.row=e),this.previewUrl="";var n={params:{filePath:this.row.path}};r["s"](n,this.withData).then((function(e){t.previewUrl=e.pdf})),this.previewVisible=!0},handleEdit:function(e,t){this.formWorkName=e,this.isEditIndex=t},confirmEdit:function(e){this.tableData[e].name=this.formWorkName,this.formWorkName=this.isEditIndex=void 0,this.tipsFlag=!0},handleUpload:function(){return this.loading=!0,!0},handleSuccess:function(e,t){this.loading=!1,1==e.code?(this.tableData.push(e.response),this.tipsFlag=!0):this.$Message.error(e.msg_detail)},handleChanget:function(e,t){this.tipsFlag=!0,this.tableData.map((function(e,t){e.useFlag=0})),1==e&&this.tableData.map((function(n,o){o==t._index&&(n.useFlag=e)}))},doSave:function(){var e=this;this.loading||(this.loading=!0,this.tipsFlag=!1,r["z"](this.tableData).then((function(t){e.loading=!1,e.$Message.success(t),e.getTemplateList()})))},handleDelete:function(e){var t=this;this.$Modal.confirm({title:"删除提示",content:"是否确定删除?",okText:"确定",cancelText:"取消",onOk:function(){t.tableData=t.tableData.filter((function(t,n){return e._index!==n})),t.doSave()}})},handleDownload:function(e){window.location.href=e.path},handleFormatError:function(e){this.loading=!1,this.$Notice.error({title:"文件类型上传错误",desc:"只接受docx的文件类型"})},selectChange:function(){this.handlePreview()},handleCheckField:function(){var e=this;this.fieldModal=!0,this.fieldLoading=!0,r["E"]().then((function(t){e.fieldLoading=!1,e.fieldTableData=t}))}}},S=F,D=(n("b46e"),Object(u["a"])(S,w,x,!1,null,"cb4874c2",null)),O=D.exports,M=function(){var e=this,t=e._self._c;return t("div",[t("h2",[e._v("人员选择器配置")]),t("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[t("Button",{attrs:{type:"primary",disabled:!e.tipsFlag},on:{click:e.doSave}},[e._v("\n 保存\n ")])],1),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.list,loading:e.loading},scopedSlots:e._u([{key:"useFlag",fn:function(n){var o=n.row;return[t("i-switch",{attrs:{"true-color":"#52c41a","true-value":1,"false-value":0,"false-color":"#cccccc",size:"large"},on:{"on-change":function(t){return e.handleChanget(t,o)}},model:{value:o.useFlag,callback:function(t){e.$set(o,"useFlag",t)},expression:"row.useFlag"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("启用")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("停用")])])]}},{key:"action",fn:function(n){var o=n.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("Button",{attrs:{type:"primary",icon:"ios-eye-outline",size:"small"},on:{click:function(t){return e.handlePreview(o)}}},[e._v("预览")])],1)]}},{key:"orderby",fn:function(n){var o=n.index;return[t("ButtonGroup",[t("Button",{attrs:{disabled:0===o,icon:"md-arrow-up"},on:{click:function(t){return e.orderby(o,"up")}}}),t("Button",{attrs:{disabled:o===e.list.length-1,icon:"md-arrow-down"},on:{click:function(t){return e.orderby(o,"down")}}})],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")])],1):e._e()],1),t("Modal",{attrs:{title:"人员选择器预览",width:"50%"},model:{value:e.previewModal,callback:function(t){e.previewModal=t},expression:"previewModal"}},[t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.previewColumns,data:e.previewTable,loading:e.previewLoading,"max-height":"600"},scopedSlots:e._u([{key:"Tag1",fn:function(n){var o=n.row;return[t("Tag",{attrs:{color:"primary"}},[e._v(e._s(o.tag1))])]}},{key:"Tag2",fn:function(n){var o=n.row;return[t("Tag",{attrs:{color:"success"}},[e._v(e._s(o.tag2))])]}}])}),t("div",{staticClass:"preview-footer",attrs:{slot:"footer"},slot:"footer"},[t("div",{staticClass:"tips"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v(" 预览数据项最多20条 ")])],1),t("div",{staticClass:"footer-button"},[t("Button",{on:{click:function(t){e.previewModal=!1}}},[e._v("取消")]),t("Button",{attrs:{type:"primary"},on:{click:function(t){e.previewModal=!1}}},[e._v("确定")])],1)])],1)],1)},I=[],L={data:function(){return{columns:[{type:"index",width:60,align:"center"},{title:"部门",key:"title",minWidth:140},{title:"状态",slot:"useFlag",align:"center",minWidth:200},{title:"操作",slot:"action",width:150,align:"center"},{title:"排序",slot:"orderby",width:120,align:"center"}],loading:!1,disabled:!1,list:[],value:"",tipsFlag:!1,previewTable:[],previewColumns:[],previewModal:!1,previewLoading:!1}},created:function(){this.getPeopleSelectList()},methods:{getPeopleSelectList:function(){var e=this;this.loading=!0,r["G"]().then((function(t){console.log(t),e.loading=!1,e.list=t}))},handleChanget:function(e,t){this.list.map((function(n,o){t._index==o&&(n.useFlag=e)})),this.tipsFlag=!0},orderby:function(e,t){var n;(n=this.list).splice.apply(n,[e,1].concat(Object(s["a"])(this.list.splice("up"===t?e-1:e+1,1,this.list[e])))),this.tipsFlag=!0},doSave:function(){var e=this;this.loading||(this.loading=!0,this.tipsFlag=!1,r["y"](this.list).then((function(t){e.loading=!1,e.$Message.success(t),e.getPeopleSelectList()})))},handlePreview:function(e){var t=this;this.previewColumns=[];var n={params:{Id:e.id}};this.previewLoading||(this.previewModal=!0,this.previewLoading=!0,r["r"](n).then((function(e){t.previewLoading=!1,t.previewTable=e.data,t.previewColumns.length<=0&&(t.previewColumns=[{type:"index",width:60,align:"center"}],e.title.map((function(e){var n={};1==e.show_type?Object.assign(n,{slot:e.field_id,title:e.show_name}):Object.assign(n,{key:e.field_id,title:e.show_name}),t.previewColumns.push(n)})))})))}}},$=L,j=(n("4a69"),Object(u["a"])($,M,I,!1,null,"cdbc14d4",null)),B=j.exports,V=function(){var e=this,t=e._self._c;return t("div",[t("Tabs",{model:{value:e.selectTab,callback:function(t){e.selectTab=t},expression:"selectTab"}},e._l(e.tabsData,(function(e,n){return t("TabPane",{key:n,attrs:{label:e.label,name:e.name}})})),1),"settingOpen"==e.selectTab?t("OpenSetting"):e._e(),"messageSetting"==e.selectTab?t("MessageSetting"):e._e(),"roleSetting"==e.selectTab?t("RoleSetting"):e._e(),"btnSetting"==e.selectTab?t("BtnSetting"):e._e(),"classifySetting"==e.selectTab?t("ClassifySetting"):e._e()],1)},R=[],E=function(){var e=this,t=e._self._c;return t("div",[t("table",{key:e.refreshKey,attrs:{width:"100%",border:"0",cellspacing:"0",cellpadding:"0"}},[e._m(0),t("tr",[t("td",[e._v(e._s(e.buttonType.submit))]),t("td",[t("CheckboxGroup",{model:{value:e.submit,callback:function(t){e.submit=t},expression:"submit"}},[t("Checkbox",{attrs:{label:e.roleType.hander&&e.roleType.hander.key}},[e._v(e._s(e.roleType.hander&&e.roleType.hander.description))]),t("Checkbox",{attrs:{label:e.roleType.ccRecipient&&e.roleType.ccRecipient.key}},[e._v(e._s(e.roleType.ccRecipient&&e.roleType.ccRecipient.description))]),t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.transfer))]),t("td",[t("CheckboxGroup",{model:{value:e.transfer,callback:function(t){e.transfer=t},expression:"transfer"}},[t("Checkbox",{attrs:{label:e.roleType.hander&&e.roleType.hander.key}},[e._v(e._s(e.roleType.hander&&e.roleType.hander.description))]),t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.reply))]),t("td",[t("CheckboxGroup",{model:{value:e.reply,callback:function(t){e.reply=t},expression:"reply"}},[t("Checkbox",{attrs:{label:e.roleType.supervisor&&e.roleType.supervisor.key}},[e._v(e._s(e.roleType.supervisor&&e.roleType.supervisor.description))]),t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.leaderComment))]),t("td",[t("CheckboxGroup",{model:{value:e.leaderComment,callback:function(t){e.leaderComment=t},expression:"leaderComment"}},[t("Checkbox",{attrs:{label:e.roleType.supervisor&&e.roleType.supervisor.key}},[e._v(e._s(e.roleType.supervisor&&e.roleType.supervisor.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.delayCompleted))]),t("td",[t("CheckboxGroup",{model:{value:e.delayCompleted,callback:function(t){e.delayCompleted=t},expression:"delayCompleted"}},[t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.completed))]),t("td",[t("CheckboxGroup",{model:{value:e.completed,callback:function(t){e.completed=t},expression:"completed"}},[t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.reopen))]),t("td",[t("CheckboxGroup",{model:{value:e.reopen,callback:function(t){e.reopen=t},expression:"reopen"}},[t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)])]),t("div",{staticClass:"save-btn"},[t("Button",{attrs:{type:"primary",size:"large"},on:{click:e.doSave}},[e._v("保存修改")])],1),e.spinShow?t("Spin",{attrs:{size:"large",fix:""}}):e._e()],1)},P=[function(){var e=this,t=e._self._c;return t("tr",[t("th",[e._v("操作")]),t("th",[e._v("提醒人")])])}],z={data:function(){return{buttonType:{},roleType:{},spinShow:!1,submit:[],transfer:[],reply:[],leaderComment:[],delayCompleted:[],completed:[],reopen:[],refreshKey:(new Date).getTime()}},created:function(){this.getMessageList()},methods:{getMessageList:function(){var e=this;this.spinShow=!0,r["F"]().then((function(t){e.spinShow=!1,e.completed=t.data.completed,e.delayCompleted=t.data.delayCompleted,e.leaderComment=t.data.leaderComment,e.reopen=t.data.reopen,e.reply=t.data.reply,e.submit=t.data.submit,e.transfer=t.data.transfer,e.roleType=t.roleType,e.buttonType=t.buttonType,e.refreshKey=(new Date).getTime()}))},doSave:function(){var e=this,t={submit:this.submit,transfer:this.transfer,reply:this.reply,leaderComment:this.leaderComment,delayCompleted:this.delayCompleted,completed:this.completed,reopen:this.reopen};this.spinShow=!0,r["w"](t).then((function(t){e.spinShow=!1,e.$Message.success(t)}))}}},G=z,W=(n("9bb7"),Object(u["a"])(G,E,P,!1,null,"c583bb18",null)),q=W.exports,A=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{display:"flex","justify-content":"center","text-align":"center"}},[t("Card",{staticStyle:{width:"400px"},attrs:{"dis-hover":""}},[t("span",{staticStyle:{"margin-right":"10px"}},[e._v("是否默认公开:")]),t("i-switch",{attrs:{"true-color":"#13ce66"},on:{"on-change":e.switchChange},model:{value:e.switchValue,callback:function(t){e.switchValue=t},expression:"switchValue"}}),t("p",{staticClass:"tips"},[e._v("此项开启后,提交的反馈将默认公示")])],1)],1)},N=[],U={data:function(){return{switchValue:!1}},created:function(){this.getDefaultPublic()},methods:{getDefaultPublic:function(){var e=this;r["D"]().then((function(t){e.switchValue=1==t}))},switchChange:function(e){var t=this,n={status:1==e?1:0};r["v"](n).then((function(e){t.$Message.success(e)}))}}},K=U,J=(n("16cf"),Object(u["a"])(K,A,N,!1,null,"7a2c3104",null)),H=J.exports,Q=function(){var e=this,t=e._self._c;return t("div",[t("table",{key:e.refreshKey,staticStyle:{"border-collapse":"collapse"},attrs:{cellspacing:"0",cellpadding:"0"}},[t("tbody",[t("tr",[e._m(0),t("th",[e._v("\n "+e._s(e.roleType.admin)+"\n ")]),t("th",[e._v("\n "+e._s(e.roleType.supervisor)+"\n ")]),t("th",[e._v("\n "+e._s(e.roleType.leader)+"\n ")])]),t("tr",[t("td",[e._v(e._s(e.feedbackStatus.processing))]),t("td",[t("CheckboxGroup",{model:{value:e.admin.processing,callback:function(t){e.$set(e.admin,"processing",t)},expression:"admin.processing"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.transfer&&e.buttonType.transfer.key}},[e._v(e._s(e.buttonType.transfer&&e.buttonType.transfer.description))]),t("Checkbox",{attrs:{label:e.buttonType.delayCompleted&&e.buttonType.delayCompleted.key}},[e._v(e._s(e.buttonType.delayCompleted&&e.buttonType.delayCompleted.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))]),t("Checkbox",{attrs:{label:e.buttonType.urging&&e.buttonType.urging.key}},[e._v(e._s(e.buttonType.urging&&e.buttonType.urging.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.supervisor.processing,callback:function(t){e.$set(e.supervisor,"processing",t)},expression:"supervisor.processing"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.transfer&&e.buttonType.transfer.key}},[e._v(e._s(e.buttonType.transfer&&e.buttonType.transfer.description))]),t("Checkbox",{attrs:{label:e.buttonType.delayCompleted&&e.buttonType.delayCompleted.key}},[e._v(e._s(e.buttonType.delayCompleted&&e.buttonType.delayCompleted.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))]),t("Checkbox",{attrs:{label:e.buttonType.urging&&e.buttonType.urging.key}},[e._v(e._s(e.buttonType.urging&&e.buttonType.urging.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.leader.processing,callback:function(t){e.$set(e.leader,"processing",t)},expression:"leader.processing"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.transfer&&e.buttonType.transfer.key}},[e._v(e._s(e.buttonType.transfer&&e.buttonType.transfer.description))]),t("Checkbox",{attrs:{label:e.buttonType.delayCompleted&&e.buttonType.delayCompleted.key}},[e._v(e._s(e.buttonType.delayCompleted&&e.buttonType.delayCompleted.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))]),t("Checkbox",{attrs:{label:e.buttonType.urging&&e.buttonType.urging.key}},[e._v(e._s(e.buttonType.urging&&e.buttonType.urging.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.feedbackStatus.completed))]),t("td",[t("CheckboxGroup",{model:{value:e.admin.completed,callback:function(t){e.$set(e.admin,"completed",t)},expression:"admin.completed"}},[t("Checkbox",{attrs:{label:e.buttonType.reopen&&e.buttonType.reopen.key}},[e._v(e._s(e.buttonType.reopen&&e.buttonType.reopen.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.supervisor.completed,callback:function(t){e.$set(e.supervisor,"completed",t)},expression:"supervisor.completed"}},[t("Checkbox",{attrs:{label:e.buttonType.reopen&&e.buttonType.reopen.key}},[e._v(e._s(e.buttonType.reopen&&e.buttonType.reopen.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.leader.completed,callback:function(t){e.$set(e.leader,"completed",t)},expression:"leader.completed"}},[t("Checkbox",{attrs:{label:e.buttonType.reopen&&e.buttonType.reopen.key}},[e._v(e._s(e.buttonType.reopen&&e.buttonType.reopen.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.feedbackStatus.delayCompleted))]),t("td",[t("CheckboxGroup",{model:{value:e.admin.delayCompleted,callback:function(t){e.$set(e.admin,"delayCompleted",t)},expression:"admin.delayCompleted"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.supervisor.delayCompleted,callback:function(t){e.$set(e.supervisor,"delayCompleted",t)},expression:"supervisor.delayCompleted"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.leader.delayCompleted,callback:function(t){e.$set(e.leader,"delayCompleted",t)},expression:"leader.delayCompleted"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1)])])]),t("div",{staticClass:"save-btn"},[t("Button",{attrs:{type:"primary",size:"large"},on:{click:e.doSave}},[e._v("保存修改")])],1),e.spinShow?t("Spin",{attrs:{size:"large",fix:""}}):e._e()],1)},X=[function(){var e=this,t=e._self._c;return t("th",{attrs:{id:"lineTd"}},[t("span",{staticStyle:{float:"left","margin-top":"20px","padding-left":"50px"}},[e._v("状态")]),t("span",{staticStyle:{float:"right","margin-top":"-10px","padding-right":"50px"}},[e._v("角色")])])}],Y={data:function(){return{refreshKey:(new Date).getTime(),buttonType:{},roleType:{},feedbackStatus:{},spinShow:!1,admin:{},supervisor:{},leader:{}}},created:function(){this.getRoleList()},methods:{getRoleList:function(){var e=this;this.spinShow=!0,r["H"]().then((function(t){e.spinShow=!1,e.roleType=t.roleType,e.buttonType=t.buttonType,e.feedbackStatus=t.feedbackStatus,e.admin=t.data.admin,e.supervisor=t.data.supervisor,e.leader=t.data.leader,e.refreshKey=(new Date).getTime()}))},doSave:function(){var e=this;this.spinShow=!0;var t={admin:this.admin,supervisor:this.supervisor,leader:this.leader};r["x"](t).then((function(t){e.spinShow=!1,e.$Message.success(t)}))}}},Z=Y,ee=(n("4d4f"),Object(u["a"])(Z,Q,X,!1,null,"09e03553",null)),te=ee.exports,ne=function(){var e=this,t=e._self._c;return t("div",[t("Table",{ref:"table",attrs:{loading:e.loading,columns:e.columns,data:e.tableData},scopedSlots:e._u([{key:"des",fn:function(n){var o=n.row,a=n.index;return[e.rechristenIndex!==a?t("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e._v("\n "+e._s(o.des)+"\n "),t("Button",{staticStyle:{color:"#515a6e"},attrs:{ghost:"",type:"text",size:"small",icon:"ios-create-outline"},on:{click:function(t){return e.handleRechristen(o.des,a)}}})],1):t("div",[t("Input",{attrs:{placeholder:"请输入字段名"},model:{value:e.rechristenValue,callback:function(t){e.rechristenValue=t},expression:"rechristenValue"}},[t("Button",{attrs:{slot:"append",icon:"md-checkmark"},on:{click:function(t){return e.confirmRechristen(a)}},slot:"append"})],1)],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")]),t("div",{staticStyle:{"text-align":"center"}},[t("Button",{attrs:{type:"primary",loading:e.saveLoading},on:{click:e.update}},[e._v("\n 保存修改\n ")])],1)],1):e._e()],1)},oe=[],ae={data:function(){return{columns:[{type:"index",width:60,align:"center"},{key:"key",title:"字段名"},{slot:"des",title:"字段描述"}],tableData:[],rechristenIndex:void 0,rechristenValue:void 0,tipsFlag:!1,saveLoading:!1}},created:function(){this.getBtnList()},methods:{getBtnList:function(){var e=this;this.loading=!0,r["B"]().then((function(t){for(var n in e.loading=!1,t)e.tableData.push({key:n,des:t[n]})})).catch((function(t){e.loading=!1}))},handleRechristen:function(e,t){this.rechristenValue=e,this.rechristenIndex=t},confirmRechristen:function(e){this.tableData[e].des=this.rechristenValue,this.rechristenValue=this.rechristenIndex=void 0,this.tipsFlag=!0},update:function(){var e=this;this.saveLoading=!0,this.loading=!0;var t={};this.tableData.map((function(e){t[e.key]=e.des})),r["t"](t).then((function(t){e.saveLoading=!1,e.loading=!1,e.tipsFlag=!1,e.$Message.success(t)}))}}},ie=ae,le=Object(u["a"])(ie,ne,oe,!1,null,null,null),se=le.exports,re=function(){var e=this,t=e._self._c;return t("div",[t("Table",{ref:"table",attrs:{loading:e.loading,columns:e.columns,data:e.tableData},scopedSlots:e._u([{key:"des",fn:function(n){var o=n.row,a=n.index;return[e.rechristenIndex!==a?t("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e._v("\n "+e._s(o.des)+"\n "),t("Button",{staticStyle:{color:"#515a6e"},attrs:{ghost:"",type:"text",size:"small",icon:"ios-create-outline"},on:{click:function(t){return e.handleRechristen(o.des,a)}}})],1):t("div",[t("Input",{attrs:{placeholder:"请输入字段名"},model:{value:e.rechristenValue,callback:function(t){e.rechristenValue=t},expression:"rechristenValue"}},[t("Button",{attrs:{slot:"append",icon:"md-checkmark"},on:{click:function(t){return e.confirmRechristen(a)}},slot:"append"})],1)],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")]),t("div",{staticStyle:{"text-align":"center"}},[t("Button",{attrs:{type:"primary",loading:e.saveLoading},on:{click:e.update}},[e._v("\n 保存修改\n ")])],1)],1):e._e()],1)},ce=[],de={data:function(){return{columns:[{type:"index",width:60,align:"center"},{key:"key",title:"字段名"},{slot:"des",title:"字段描述"}],tableData:[],rechristenIndex:void 0,rechristenValue:void 0,tipsFlag:!1,saveLoading:!1}},created:function(){this.getBtnList()},methods:{getBtnList:function(){var e=this;this.loading=!0,r["C"]().then((function(t){for(var n in e.loading=!1,t)e.tableData.push({key:n,des:t[n]})})).catch((function(t){e.loading=!1}))},handleRechristen:function(e,t){this.rechristenValue=e,this.rechristenIndex=t},confirmRechristen:function(e){this.tableData[e].des=this.rechristenValue,this.rechristenValue=this.rechristenIndex=void 0,this.tipsFlag=!0},update:function(){var e=this;this.saveLoading=!0,this.loading=!0;var t={};this.tableData.map((function(e){t[e.key]=e.des})),r["u"](t).then((function(t){e.saveLoading=!1,e.loading=!1,e.tipsFlag=!1,e.$Message.success(t)}))}}},ue=de,pe=Object(u["a"])(ue,re,ce,!1,null,null,null),he=pe.exports,be={data:function(){return{tabsData:[{label:"消息提醒配置",name:"messageSetting"},{label:"角色操作配置",name:"roleSetting"},{label:"功能按钮名称配置",name:"btnSetting"},{label:"栏目分类名称配置",name:"classifySetting"},{label:"默认公开配置",name:"settingOpen"}],selectTab:"messageSetting"}},components:{MessageSetting:q,OpenSetting:H,RoleSetting:te,BtnSetting:se,ClassifySetting:he}},ye=be,me=Object(u["a"])(ye,V,R,!1,null,null,null),fe=me.exports,ve={name:"setting-account",components:{fields:h,type:k,Selector:B,Formwork:O,OtherSetting:fe},data:function(){return{currentType:"type"}},methods:{handleChangeCell:function(e){this.currentType=e}}},ge=ve,_e=Object(u["a"])(ge,o,a,!1,null,null,null);t["default"]=_e.exports},"36fb":function(e,t,n){},"42cb":function(e,t,n){},"4a69":function(e,t,n){"use strict";n("3408")},"4d4f":function(e,t,n){"use strict";n("a434")},5430:function(e,t,n){"use strict";n("1dac")},"9bb7":function(e,t,n){"use strict";n("d390")},a434:function(e,t,n){},b46e:function(e,t,n){"use strict";n("42cb")},d390:function(e,t,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c5d0d63"],{"16cf":function(e,t,n){"use strict";n("36fb")},"1dac":function(e,t,n){},3408:function(e,t,n){},"351e":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e._self._c;return t("div",[t("Row",{attrs:{gutter:24}},[t("Col",{attrs:{xl:6,lg:6,md:0,sm:0,xs:0}},[t("Card",{attrs:{shadow:"",title:"通用设置",icon:"md-options",padding:0}},[t("CellGroup",{staticClass:"ivu-pt-8 ivu-pb-8",on:{"on-click":e.handleChangeCell}},[t("Cell",{attrs:{title:"1、反馈类型",name:"type",label:"反馈类型选项的设置",selected:"type"===e.currentType}}),t("Cell",{attrs:{title:"2、表单管理",name:"fields",label:"自定义表单的字段",selected:"fields"===e.currentType}}),t("Cell",{attrs:{title:"3、人员选择器",name:"selector",label:"移动端人员选择器配置",selected:"selector"===e.currentType}}),t("Cell",{attrs:{title:"4、其他",name:"other",label:"是否公开,消息提醒,角色操作等配置",selected:"other"===e.currentType}})],1)],1)],1),t("Col",{attrs:{xl:18,lg:18,md:24,sm:24,xs:24}},[t("Card",{attrs:{bordered:!1,"dis-hover":""}},[t("Row",[t("Col",{attrs:{xl:0,lg:0,md:24,sm:24,xs:24}},[t("Tabs",{attrs:{value:e.currentType},on:{"on-click":e.handleChangeCell}},[t("TabPane",{attrs:{label:"反馈表单",name:"fields"}}),t("TabPane",{attrs:{label:"反馈类型",name:"type"}}),t("TabPane",{attrs:{label:"人员选择器",name:"selector"}}),t("TabPane",{attrs:{label:"其他",name:"other"}})],1)],1)],1),"fields"===e.currentType?t("fields"):e._e(),"type"===e.currentType?t("type"):e._e(),"selector"===e.currentType?t("Selector"):e._e(),"other"===e.currentType?t("OtherSetting"):e._e()],1)],1)],1)],1)},a=[],i=(n("7f7f"),function(){var e=this,t=e._self._c;return t("div",[t("Tabs",{on:{"on-click":e.tabsChange},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.tabs,(function(n){return t("TabPane",{key:n.name,attrs:{label:n.label,name:n.name}},[t("Table",{ref:"table",refInFor:!0,staticClass:"ivu-mt",attrs:{border:"",loading:e.loading,columns:e.columns,data:e.list},scopedSlots:e._u([{key:"showType",fn:function(t){var n=t.row;return[e._v("\n "+e._s("Radio"===n.showType?"单选":"文本")+"\n ")]}},{key:"showFlag",fn:function(n){var o=n.row;return[0===o.showFlag?t("Tag",{attrs:{color:"default"}},[e._v("隐藏")]):t("Tag",{attrs:{color:"success"}},[e._v("显示")])]}},{key:"required",fn:function(t){var n=t.row;return[e._v("\n "+e._s(1===n.required?"必填":"选填")+"\n ")]}},{key:"options",fn:function(t){var n=t.row;return[e._v("\n "+e._s(n.options?n.options.join(" / "):"")+"\n ")]}},{key:"action",fn:function(n){var o=n.row,a=n.index;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(o,a)}}},[e._v("编辑")])])]}}],null,!0)}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")]),t("div",{staticStyle:{"text-align":"center"}},[t("Button",{attrs:{type:"primary",loading:e.saveLoading},on:{click:e.update}},[e._v("\n 保存修改\n ")])],1)],1):e._e()],1)})),1),t("Modal",{staticClass:"add-modal",attrs:{width:"40%",title:"修改字段"},on:{"on-ok":e.confirmEdit},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[t("Form",{ref:"form",attrs:{model:e.formData,rules:e.formRule,"label-width":80}},[t("FormItem",{attrs:{label:"字段名称",prop:"name"}},[t("Input",{attrs:{placeholder:"请输入字段名称"},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),"item"===e.formData.id?t("FormItem",{attrs:{label:"字段类型",prop:"showType"}},[t("RadioGroup",{model:{value:e.formData.showType,callback:function(t){e.$set(e.formData,"showType",t)},expression:"formData.showType"}},[t("Radio",{attrs:{label:"Text"}},[e._v("文本")]),t("Radio",{attrs:{label:"Radio"}},[e._v("单选")])],1)],1):e._e(),t("FormItem",{attrs:{label:"是否隐藏",prop:"showFlag"}},[[t("i-switch",{attrs:{size:"large",trueValue:1,falseValue:0},model:{value:e.formData.showFlag,callback:function(t){e.$set(e.formData,"showFlag",t)},expression:"formData.showFlag"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("隐藏")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("显示")])])]],2),t("FormItem",{attrs:{label:"是否必填",prop:"required"}},[[t("i-switch",{attrs:{size:"large",trueValue:1,falseValue:0},model:{value:e.formData.required,callback:function(t){e.$set(e.formData,"required",t)},expression:"formData.required"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("必填")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("选填")])])]],2),t("FormItem",{attrs:{label:"描述",prop:"description"}},[t("Input",{attrs:{placeholder:"请输入占位文本"},model:{value:e.formData.description,callback:function(t){e.$set(e.formData,"description",t)},expression:"formData.description"}})],1),"item"===e.formData.id||"address"==e.formData.id?t("FormItem",{attrs:{label:"选项",prop:"options"}},[e._l(e.formData.options,(function(n,o){return t("Tag",{key:o,attrs:{name:o,closable:"",size:"large"},on:{"on-close":function(t){return e.handleDel(o)}}},[e._v(e._s(n)+"\n ")])})),t("Button",{staticClass:"ivu-ml-8",attrs:{type:"dashed",icon:"md-add"},on:{click:e.handleAdd}},[e._v("\n 添加\n ")])],2):e._e()],1)],1)],1)}),l=[],s=n("2909"),r=n("7274"),c={data:function(){return{columns:[{type:"index",width:60,align:"center"},{title:"ID",key:"id",width:150},{key:"name",title:"字段名称",minWidth:150},{key:"showType",slot:"showType",title:"字段类型",minWidth:100},{key:"showFlag",slot:"showFlag",title:"显示/隐藏",minWidth:100},{key:"required",slot:"required",title:"必填/选填",minWidth:100},{key:"description",title:"描述",minWidth:150},{key:"options",slot:"options",title:"选项",minWidth:200},{title:"操作",slot:"action",align:"center",fixed:"right",width:80}],loading:!1,saveLoading:!1,list:[],rechristenIndex:void 0,rechristenValue:void 0,tipsFlag:!1,tabs:[{label:"反馈填报表单",name:"AddFormField"},{label:"转办填报表单",name:"TransferFormField"},{label:"回复表单",name:"ReplyFormField"}],activeTab:"AddFormField",descriptionInput:"",isEditIndex:void 0,modal:!1,modalLoading:!0,editIndex:void 0,formData:{showFlag:!0,name:"",description:"",showType:"",required:!0,options:[]},formRule:{name:[{required:!0,message:"请输入名称",trigger:"blur"}]}}},created:function(){this.getData()},methods:{getData:function(){var e=this;this.list=[],this.loading||(this.loading=!0,Object(r["FormFieldList"])({type:this.activeTab}).then((function(t){e.list=t,e.loading=!1})))},changeRequired:function(e,t){this.list[t._index].required=e?1:0,this.tipsFlag=!0},changeShowFlag:function(e,t){this.list[t._index].showFlag=e?1:0,this.val||(this.list[t._index].required=0),this.tipsFlag=!0},orderby:function(e,t){var n;(n=this.list).splice.apply(n,[e,1].concat(Object(s["a"])(this.list.splice("up"===t?e-1:e+1,1,this.list[e])))),this.tipsFlag=!0},handleRechristen:function(e,t){this.rechristenValue=e,this.rechristenIndex=t},confirmRechristen:function(e){this.list[e].name=this.rechristenValue,this.rechristenValue=this.rechristenIndex=void 0,this.tipsFlag=!0},update:function(){var e=this;this.saveLoading=!0,this.rechristenValue=this.rechristenIndex=void 0,Object(r["FormFieldUpdate"])(this.list,this.activeTab).then((function(){e.$Message.success("修改成功"),e.saveLoading=e.tipsFlag=!1})).catch((function(){e.$Message.error("修改失败"),e.saveLoading=e.tipsFlag=!1,e.getData()}))},tabsChange:function(){this.tipsFlag=!1,this.descriptionInput="",this.descriptionInput=this.isEditIndex=void 0,this.getData()},handleEdit:function(e,t){this.formData=JSON.parse(JSON.stringify(e)),this.modal=!0,this.editIndex=t},handleDel:function(e){this.formData.options.splice(e,1)},handleAdd:function(){var e=this,t="";this.$Modal.confirm({render:function(e){return e("Input",{props:{value:t,autofocus:!0,placeholder:"请输入选项"},on:{input:function(e){t=e}}})},onOk:function(){""==e.value?e.$Message.info("请输入选项"):(e.formData.options||(e.formData.options=[]),e.formData.options.push(t))}})},confirmEdit:function(){var e=this;this.$refs["form"].validate((function(t){t&&(e.$set(e.list,e.editIndex,e.formData),e.modal=!1,e.tipsFlag=!0)}))}}},d=c,u=n("2877"),p=Object(u["a"])(d,i,l,!1,null,null,null),h=p.exports,b=function(){var e=this,t=e._self._c;return t("div",[t("h2",[e._v("反馈类型")]),t("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t("Button",{attrs:{type:"primary",ghost:"",icon:"md-add"},on:{click:e.handleOpenCreate}},[e._v("\n 添加分类\n ")]),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.list,loading:e.loading},scopedSlots:e._u([{key:"enable_status",fn:function(n){var o=n.row;return[t("i-switch",{attrs:{"true-color":"#52c41a","false-color":"#cccccc",size:"large",disabled:e.disabled},on:{"on-change":function(t){return e.handleChanget(t,o)}},model:{value:1===o.enable_status,callback:function(t){e.$set(o,"enable_status === 1",t)},expression:"row.enable_status === 1"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("启用")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("停用")])])]}},{key:"action",fn:function(n){var o=n.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(o)}}},[e._v("编辑")]),t("Divider",{attrs:{type:"vertical"}}),t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleDel(o.id)}}},[e._v("删除")])],1)]}},{key:"orderby",fn:function(n){var o=n.index;return[t("ButtonGroup",[t("Button",{attrs:{disabled:0===o,icon:"md-arrow-up"},on:{click:function(t){return e.orderby(o,"up")}}}),t("Button",{attrs:{disabled:o===e.list.length-1,icon:"md-arrow-down"},on:{click:function(t){return e.orderby(o,"down")}}})],1)]}}])})],1),t("Modal",{attrs:{title:"添加分类",loading:e.modalLoading},on:{"on-ok":e.handleAdd},model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[t("Form",{ref:"addForm",attrs:{model:e.addForm,"label-position":"right","label-width":100,rules:e.ruleValidate}},[t("FormItem",{attrs:{label:"加减分",prop:"add_or_reduce"}},[t("Select",{model:{value:e.addForm.add_or_reduce,callback:function(t){e.$set(e.addForm,"add_or_reduce",t)},expression:"addForm.add_or_reduce"}},e._l(e.options,(function(n){return t("Option",{key:n.id,attrs:{value:n.id}},[e._v(e._s(n.label))])})),1)],1),t("FormItem",{attrs:{label:"行为类型",prop:"type_name"}},[t("Input",{model:{value:e.addForm.type_name,callback:function(t){e.$set(e.addForm,"type_name",t)},expression:"addForm.type_name"}})],1),t("FormItem",{attrs:{label:"行为描述"}},[t("Input",{model:{value:e.addForm.type_desc,callback:function(t){e.$set(e.addForm,"type_desc",t)},expression:"addForm.type_desc"}})],1),t("FormItem",{attrs:{label:"行为得分"}},[t("InputNumber",{model:{value:e.addForm.score,callback:function(t){e.$set(e.addForm,"score",t)},expression:"addForm.score"}})],1)],1)],1),t("Modal",{attrs:{title:"编辑分类",loading:e.modalLoading},on:{"on-ok":e.confirmEdit},model:{value:e.showEditModal,callback:function(t){e.showEditModal=t},expression:"showEditModal"}},[t("Form",{ref:"editForm",attrs:{model:e.editForm,"label-position":"right","label-width":100,rules:e.ruleValidate}},[t("FormItem",{attrs:{label:"加减分",prop:"add_or_reduce"}},[t("Select",{model:{value:e.editForm.add_or_reduce,callback:function(t){e.$set(e.editForm,"add_or_reduce",t)},expression:"editForm.add_or_reduce"}},e._l(e.options,(function(n){return t("Option",{key:n.id,attrs:{value:n.id}},[e._v(e._s(n.label))])})),1)],1),t("FormItem",{attrs:{label:"行为类型",prop:"type_name"}},[t("Input",{model:{value:e.editForm.type_name,callback:function(t){e.$set(e.editForm,"type_name",t)},expression:"editForm.type_name"}})],1),t("FormItem",{attrs:{label:"行为描述"}},[t("Input",{model:{value:e.editForm.type_desc,callback:function(t){e.$set(e.editForm,"type_desc",t)},expression:"editForm.type_desc"}})],1),t("FormItem",{attrs:{label:"行为得分"}},[t("InputNumber",{model:{value:e.editForm.score,callback:function(t){e.$set(e.editForm,"score",t)},expression:"editForm.score"}})],1)],1)],1)],1)},m=[],y=(n("8e6e"),n("ac6a"),n("456d"),n("ade3"));function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){Object(y["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={data:function(){return{columns:[],loading:!1,disabled:!1,list:[],total:0,value:"",pageIndex:1,pageSize:20,showModal:!1,showEditModal:!1,addForm:{add_or_reduce:"",type_name:"",type_desc:"",score:0},editForm:{add_or_reduce:"",type_name:"",type_desc:"",score:0},options:[],modalLoading:!0,ruleValidate:{add_or_reduce:[{required:!0,message:"请选择加减分",trigger:"change"}],type_name:[{required:!0,message:"请填写行为类型",trigger:"blur"}]},row:{}}},computed:{},created:function(){this.getData(),this.AddOrReduceList()},methods:{getData:function(){var e=this;if(!this.loading){this.loading=!0;var t={pageIndex:this.pageIndex,pageSize:this.pageSize,keyWord:""};Object(r["OptionList"])(t).then((function(t){e.list=t.data,e.total=t.dataCount,e.loading=!1,e.columns.length<=0&&(e.columns=[{type:"index",width:80,align:"center",title:"序号"}],t.title.map((function(t){var n={};1==t.order_by_flag&&Object.assign(n,{sortable:"custom"}),1==t.show_type?Object.assign(n,{slot:t.field_id,title:t.show_name}):Object.assign(n,{key:t.field_id,title:t.show_name}),e.columns.push(n)})),e.columns.push({title:"操作",slot:"action"}))}))}},handleOpenCreate:function(){this.showModal=!0},handleEdit:function(e){this.editForm.type_name=e.type_name,this.editForm.type_desc=e.type_desc,this.editForm.add_or_reduce=e.add_or_reduce,this.editForm.score=e.score,this.row=e,this.showEditModal=!0},handleChanget:function(e,t){var n=this;this.disabled||(this.disabled=!0,Object(r["OptionEnable"])(t.id).then((function(){n.$Message.success("修改成功"),n.disabled=!1})).catch((function(){n.disabled=!1})))},orderby:function(e,t){var n=this,o={};switch(t){case"up":o={one:this.list[e-1].id,two:this.list[e].id};break;case"down":o={one:this.list[e].id,two:this.list[e+1].id};break}Object(r["OptionSort"])(o).then((function(){var o;(o=n.list).splice.apply(o,[e,1].concat(Object(s["a"])(n.list.splice("up"===t?e-1:e+1,1,n.list[e]))))}))},handleDel:function(e){var t=this;this.$Modal.confirm({title:"确定要删除吗?",onOk:function(){Object(r["OptionDelete"])(e).then((function(){t.$Message.success("删除成功"),t.getData()}))}})},AddOrReduceList:function(){var e=this;Object(r["AddOrReduceList"])().then((function(t){e.options=t}))},handleAdd:function(){var e=this;this.$refs.addForm.validate((function(t){t?Object(r["OptionAdd"])(e.addForm).then((function(t){e.handleModalLoading(),e.showModal=!1,e.$Message.success("添加成功"),e.getData()})).catch((function(){e.handleModalLoading()})):(e.handleModalLoading(),e.$Message.error("表单校验不通过"))}))},confirmEdit:function(){var e=this;this.$refs.editForm.validate((function(t){if(t){var n=v(v({},e.editForm),{},{id:e.row.id});Object(r["OptionUpdate"])(n).then((function(t){e.handleModalLoading(),e.showEditModal=!1,e.$Message.success("编辑成功"),e.getData()})).catch((function(){e.handleModalLoading()}))}else e.handleModalLoading(),e.$Message.error("表单校验不通过")}))},handleModalLoading:function(){var e=this;this.modalLoading=!1,this.$nextTick((function(){e.modalLoading=!0}))}}},_=g,T=(n("5430"),Object(u["a"])(_,b,m,!1,null,null,null)),k=T.exports,w=function(){var e=this,t=e._self._c;return t("div",[t("h2",[e._v("模板配置")]),t("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[t("Upload",{attrs:{multiple:"",action:"/feedback/api/Config/ExportTemplate/Upload","before-upload":e.handleUpload,"on-success":e.handleSuccess,"show-upload-list":!1,headers:{Authorization:e.token},format:["docx"],"on-format-error":e.handleFormatError}},[t("Button",{attrs:{type:"primary",ghost:"",icon:"ios-cloud-upload-outline"}},[e._v("\n 模板上传\n ")])],1),t("div",[t("Button",{staticStyle:{"margin-right":"20px"},attrs:{type:"primary"},on:{click:e.handleCheckField}},[e._v("\n 模板字段查看\n ")]),t("Button",{attrs:{type:"primary",disabled:!e.tipsFlag},on:{click:e.doSave}},[e._v("\n 保存\n ")])],1)],1),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.tableData,loading:e.loading},scopedSlots:e._u([{key:"name",fn:function(n){var o=n.row,a=n.index;return[e.isEditIndex!==a?t("div",[t("a",{staticClass:"formwork-name",on:{click:function(t){return e.handleDownload(o)}}},[e._v(e._s(o.name))]),t("Button",{staticStyle:{color:"#515a6e"},attrs:{ghost:"",type:"text",size:"small",icon:"ios-create-outline"},on:{click:function(t){return e.handleEdit(o.name,a)}}})],1):t("div",[t("Input",{attrs:{placeholder:"请输入模板名称"},model:{value:e.formWorkName,callback:function(t){e.formWorkName=t},expression:"formWorkName"}},[t("Button",{attrs:{slot:"append",icon:"md-checkmark"},on:{click:function(t){return e.confirmEdit(a)}},slot:"append"})],1)],1)]}},{key:"useFlag",fn:function(n){var o=n.row;return[t("i-switch",{attrs:{"true-color":"#52c41a","true-value":1,"false-value":0,"false-color":"#cccccc",size:"large"},on:{"on-change":function(t){return e.handleChanget(t,o)}},model:{value:o.useFlag,callback:function(t){e.$set(o,"useFlag",t)},expression:"row.useFlag"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("启用")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("停用")])])]}},{key:"action",fn:function(n){var o=n.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("Button",{attrs:{type:"primary",icon:"ios-eye-outline",size:"small"},on:{click:function(t){return e.handlePreview(o)}}},[e._v("预览")]),t("Divider",{attrs:{type:"vertical"}}),t("Button",{attrs:{type:"error",icon:"ios-trash-outline",size:"small"},on:{click:function(t){return e.handleDelete(o)}}},[e._v("删除")])],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")])],1):e._e()],1),t("Drawer",{attrs:{closable:!1,width:"70%"},model:{value:e.previewVisible,callback:function(t){e.previewVisible=t},expression:"previewVisible"}},[t("div",{staticStyle:{display:"flex","align-items":"center"},attrs:{slot:"header"},slot:"header"},[t("h3",{staticStyle:{"margin-right":"20px"}},[e._v("模板预览")]),t("Select",{staticStyle:{width:"200px"},on:{"on-change":e.selectChange},model:{value:e.withData,callback:function(t){e.withData=t},expression:"withData"}},e._l(e.cityList,(function(n){return t("Option",{key:n.value,attrs:{value:n.value}},[e._v(e._s(n.label))])})),1)],1),t("iframe",{staticStyle:{width:"100%",height:"100%"},attrs:{src:e.previewUrl}})]),t("Modal",{attrs:{title:"待处理人",width:"50%"},on:{"on-ok":function(t){e.fieldModal=!1}},model:{value:e.fieldModal,callback:function(t){e.fieldModal=t},expression:"fieldModal"}},[t("Table",{ref:"table",attrs:{loading:e.fieldLoading,columns:e.fieldColumns,data:e.fieldTableData,"max-height":"600"}})],1)],1)},x=[],C=n("c276"),F={data:function(){return{columns:[{type:"index",width:60,align:"center"},{title:"模板名称",key:"name",slot:"name",minWidth:140},{title:"状态",key:"useFlag",slot:"useFlag",minWidth:140},{title:"操作",key:"action",slot:"action",minWidth:150,align:"center"}],loading:!1,tableData:[],isEditIndex:void 0,formWorkName:"",value:"",token:"",tipsFlag:!1,previewVisible:!1,previewUrl:"",withData:0,cityList:[{value:0,label:"不填充数据"},{value:1,label:"填充数据"}],row:{},fieldModal:!1,fieldLoading:!1,fieldColumns:[{type:"index",width:60,align:"center"},{key:"value",title:"字段值"},{key:"label",title:"字段名"}],fieldTableData:[]}},computed:{},created:function(){this.getTemplateList(),this.token="Bearer "+C["a"].cookies.get("token")},methods:{getTemplateList:function(){var e=this;this.loading=!0,r["getTemplateList"]().then((function(t){e.loading=!1,e.tableData=t}))},handlePreview:function(e){var t=this;e&&(this.row=e),this.previewUrl="";var n={params:{filePath:this.row.path}};r["PreviewTemplate"](n,this.withData).then((function(e){t.previewUrl=e.pdf})),this.previewVisible=!0},handleEdit:function(e,t){this.formWorkName=e,this.isEditIndex=t},confirmEdit:function(e){this.tableData[e].name=this.formWorkName,this.formWorkName=this.isEditIndex=void 0,this.tipsFlag=!0},handleUpload:function(){return this.loading=!0,!0},handleSuccess:function(e,t){this.loading=!1,1==e.code?(this.tableData.push(e.response),this.tipsFlag=!0):this.$Message.error(e.msg_detail)},handleChanget:function(e,t){this.tipsFlag=!0,this.tableData.map((function(e,t){e.useFlag=0})),1==e&&this.tableData.map((function(n,o){o==t._index&&(n.useFlag=e)}))},doSave:function(){var e=this;this.loading||(this.loading=!0,this.tipsFlag=!1,r["UpdateTemplate"](this.tableData).then((function(t){e.loading=!1,e.$Message.success(t),e.getTemplateList()})))},handleDelete:function(e){var t=this;this.$Modal.confirm({title:"删除提示",content:"是否确定删除?",okText:"确定",cancelText:"取消",onOk:function(){t.tableData=t.tableData.filter((function(t,n){return e._index!==n})),t.doSave()}})},handleDownload:function(e){window.location.href=e.path},handleFormatError:function(e){this.loading=!1,this.$Notice.error({title:"文件类型上传错误",desc:"只接受docx的文件类型"})},selectChange:function(){this.handlePreview()},handleCheckField:function(){var e=this;this.fieldModal=!0,this.fieldLoading=!0,r["getField"]().then((function(t){e.fieldLoading=!1,e.fieldTableData=t}))}}},S=F,D=(n("b46e"),Object(u["a"])(S,w,x,!1,null,"cb4874c2",null)),O=D.exports,L=function(){var e=this,t=e._self._c;return t("div",[t("h2",[e._v("人员选择器配置")]),t("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[t("Button",{attrs:{type:"primary",disabled:!e.tipsFlag},on:{click:e.doSave}},[e._v("\n 保存\n ")])],1),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.list,loading:e.loading},scopedSlots:e._u([{key:"useFlag",fn:function(n){var o=n.row;return[t("i-switch",{attrs:{"true-color":"#52c41a","true-value":1,"false-value":0,"false-color":"#cccccc",size:"large"},on:{"on-change":function(t){return e.handleChanget(t,o)}},model:{value:o.useFlag,callback:function(t){e.$set(o,"useFlag",t)},expression:"row.useFlag"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v("启用")]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v("停用")])])]}},{key:"action",fn:function(n){var o=n.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("Button",{attrs:{type:"primary",icon:"ios-eye-outline",size:"small"},on:{click:function(t){return e.handlePreview(o)}}},[e._v("预览")])],1)]}},{key:"orderby",fn:function(n){var o=n.index;return[t("ButtonGroup",[t("Button",{attrs:{disabled:0===o,icon:"md-arrow-up"},on:{click:function(t){return e.orderby(o,"up")}}}),t("Button",{attrs:{disabled:o===e.list.length-1,icon:"md-arrow-down"},on:{click:function(t){return e.orderby(o,"down")}}})],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")])],1):e._e()],1),t("Modal",{attrs:{title:"人员选择器预览",width:"50%"},model:{value:e.previewModal,callback:function(t){e.previewModal=t},expression:"previewModal"}},[t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.previewColumns,data:e.previewTable,loading:e.previewLoading,"max-height":"600"},scopedSlots:e._u([{key:"Tag1",fn:function(n){var o=n.row;return[t("Tag",{attrs:{color:"primary"}},[e._v(e._s(o.tag1))])]}},{key:"Tag2",fn:function(n){var o=n.row;return[t("Tag",{attrs:{color:"success"}},[e._v(e._s(o.tag2))])]}}])}),t("div",{staticClass:"preview-footer",attrs:{slot:"footer"},slot:"footer"},[t("div",{staticClass:"tips"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v(" 预览数据项最多20条 ")])],1),t("div",{staticClass:"footer-button"},[t("Button",{on:{click:function(t){e.previewModal=!1}}},[e._v("取消")]),t("Button",{attrs:{type:"primary"},on:{click:function(t){e.previewModal=!1}}},[e._v("确定")])],1)])],1)],1)},M=[],I={data:function(){return{columns:[{type:"index",width:60,align:"center"},{title:"部门",key:"title",minWidth:140},{title:"状态",slot:"useFlag",align:"center",minWidth:200},{title:"操作",slot:"action",width:150,align:"center"},{title:"排序",slot:"orderby",width:120,align:"center"}],loading:!1,disabled:!1,list:[],value:"",tipsFlag:!1,previewTable:[],previewColumns:[],previewModal:!1,previewLoading:!1}},created:function(){this.getPeopleSelectList()},methods:{getPeopleSelectList:function(){var e=this;this.loading=!0,r["getPeopleSelectList"]().then((function(t){console.log(t),e.loading=!1,e.list=t}))},handleChanget:function(e,t){this.list.map((function(n,o){t._index==o&&(n.useFlag=e)})),this.tipsFlag=!0},orderby:function(e,t){var n;(n=this.list).splice.apply(n,[e,1].concat(Object(s["a"])(this.list.splice("up"===t?e-1:e+1,1,this.list[e])))),this.tipsFlag=!0},doSave:function(){var e=this;this.loading||(this.loading=!0,this.tipsFlag=!1,r["UpdateSelectList"](this.list).then((function(t){e.loading=!1,e.$Message.success(t),e.getPeopleSelectList()})))},handlePreview:function(e){var t=this;this.previewColumns=[];var n={params:{Id:e.id}};this.previewLoading||(this.previewModal=!0,this.previewLoading=!0,r["PreviewSelectList"](n).then((function(e){t.previewLoading=!1,t.previewTable=e.data,t.previewColumns.length<=0&&(t.previewColumns=[{type:"index",width:60,align:"center"}],e.title.map((function(e){var n={};1==e.show_type?Object.assign(n,{slot:e.field_id,title:e.show_name}):Object.assign(n,{key:e.field_id,title:e.show_name}),t.previewColumns.push(n)})))})))}}},$=I,j=(n("4a69"),Object(u["a"])($,L,M,!1,null,"cdbc14d4",null)),B=j.exports,V=function(){var e=this,t=e._self._c;return t("div",[t("Tabs",{model:{value:e.selectTab,callback:function(t){e.selectTab=t},expression:"selectTab"}},e._l(e.tabsData,(function(e,n){return t("TabPane",{key:n,attrs:{label:e.label,name:e.name}})})),1),"settingOpen"==e.selectTab?t("OpenSetting"):e._e(),"messageSetting"==e.selectTab?t("MessageSetting"):e._e(),"roleSetting"==e.selectTab?t("RoleSetting"):e._e(),"btnSetting"==e.selectTab?t("BtnSetting"):e._e(),"classifySetting"==e.selectTab?t("ClassifySetting"):e._e()],1)},P=[],R=function(){var e=this,t=e._self._c;return t("div",[t("table",{key:e.refreshKey,attrs:{width:"100%",border:"0",cellspacing:"0",cellpadding:"0"}},[e._m(0),t("tr",[t("td",[e._v(e._s(e.buttonType.submit))]),t("td",[t("CheckboxGroup",{model:{value:e.submit,callback:function(t){e.submit=t},expression:"submit"}},[t("Checkbox",{attrs:{label:e.roleType.hander&&e.roleType.hander.key}},[e._v(e._s(e.roleType.hander&&e.roleType.hander.description))]),t("Checkbox",{attrs:{label:e.roleType.ccRecipient&&e.roleType.ccRecipient.key}},[e._v(e._s(e.roleType.ccRecipient&&e.roleType.ccRecipient.description))]),t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.transfer))]),t("td",[t("CheckboxGroup",{model:{value:e.transfer,callback:function(t){e.transfer=t},expression:"transfer"}},[t("Checkbox",{attrs:{label:e.roleType.hander&&e.roleType.hander.key}},[e._v(e._s(e.roleType.hander&&e.roleType.hander.description))]),t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.reply))]),t("td",[t("CheckboxGroup",{model:{value:e.reply,callback:function(t){e.reply=t},expression:"reply"}},[t("Checkbox",{attrs:{label:e.roleType.supervisor&&e.roleType.supervisor.key}},[e._v(e._s(e.roleType.supervisor&&e.roleType.supervisor.description))]),t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.leaderComment))]),t("td",[t("CheckboxGroup",{model:{value:e.leaderComment,callback:function(t){e.leaderComment=t},expression:"leaderComment"}},[t("Checkbox",{attrs:{label:e.roleType.supervisor&&e.roleType.supervisor.key}},[e._v(e._s(e.roleType.supervisor&&e.roleType.supervisor.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.delayCompleted))]),t("td",[t("CheckboxGroup",{model:{value:e.delayCompleted,callback:function(t){e.delayCompleted=t},expression:"delayCompleted"}},[t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.completed))]),t("td",[t("CheckboxGroup",{model:{value:e.completed,callback:function(t){e.completed=t},expression:"completed"}},[t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.buttonType.reopen))]),t("td",[t("CheckboxGroup",{model:{value:e.reopen,callback:function(t){e.reopen=t},expression:"reopen"}},[t("Checkbox",{attrs:{label:e.roleType.leader&&e.roleType.leader.key}},[e._v(e._s(e.roleType.leader&&e.roleType.leader.description))])],1)],1)])]),t("div",{staticClass:"save-btn"},[t("Button",{attrs:{type:"primary",size:"large"},on:{click:e.doSave}},[e._v("保存修改")])],1),e.spinShow?t("Spin",{attrs:{size:"large",fix:""}}):e._e()],1)},E=[function(){var e=this,t=e._self._c;return t("tr",[t("th",[e._v("操作")]),t("th",[e._v("提醒人")])])}],z={data:function(){return{buttonType:{},roleType:{},spinShow:!1,submit:[],transfer:[],reply:[],leaderComment:[],delayCompleted:[],completed:[],reopen:[],refreshKey:(new Date).getTime()}},created:function(){this.getMessageList()},methods:{getMessageList:function(){var e=this;this.spinShow=!0,r["getMessageList"]().then((function(t){e.spinShow=!1,e.completed=t.data.completed,e.delayCompleted=t.data.delayCompleted,e.leaderComment=t.data.leaderComment,e.reopen=t.data.reopen,e.reply=t.data.reply,e.submit=t.data.submit,e.transfer=t.data.transfer,e.roleType=t.roleType,e.buttonType=t.buttonType,e.refreshKey=(new Date).getTime()}))},doSave:function(){var e=this,t={submit:this.submit,transfer:this.transfer,reply:this.reply,leaderComment:this.leaderComment,delayCompleted:this.delayCompleted,completed:this.completed,reopen:this.reopen};this.spinShow=!0,r["UpdateMessage"](t).then((function(t){e.spinShow=!1,e.$Message.success(t)}))}}},G=z,W=(n("9bb7"),Object(u["a"])(G,R,E,!1,null,"c583bb18",null)),A=W.exports,U=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{display:"flex","justify-content":"center","text-align":"center"}},[t("Card",{staticStyle:{width:"400px"},attrs:{"dis-hover":""}},[t("span",{staticStyle:{"margin-right":"10px"}},[e._v("是否默认公开:")]),t("i-switch",{attrs:{"true-color":"#13ce66"},on:{"on-change":e.switchChange},model:{value:e.switchValue,callback:function(t){e.switchValue=t},expression:"switchValue"}}),t("p",{staticClass:"tips"},[e._v("此项开启后,提交的反馈将默认公示")])],1)],1)},q=[],N={data:function(){return{switchValue:!1}},created:function(){this.getDefaultPublic()},methods:{getDefaultPublic:function(){var e=this;r["getDefaultPublic"]().then((function(t){e.switchValue=1==t}))},switchChange:function(e){var t=this,n={status:1==e?1:0};r["UpdateDefaultPublic"](n).then((function(e){t.$Message.success(e)}))}}},K=N,J=(n("16cf"),Object(u["a"])(K,U,q,!1,null,"7a2c3104",null)),H=J.exports,Q=function(){var e=this,t=e._self._c;return t("div",[t("table",{key:e.refreshKey,staticStyle:{"border-collapse":"collapse"},attrs:{cellspacing:"0",cellpadding:"0"}},[t("tbody",[t("tr",[e._m(0),t("th",[e._v("\n "+e._s(e.roleType.admin)+"\n ")]),t("th",[e._v("\n "+e._s(e.roleType.supervisor)+"\n ")]),t("th",[e._v("\n "+e._s(e.roleType.leader)+"\n ")])]),t("tr",[t("td",[e._v(e._s(e.feedbackStatus.processing))]),t("td",[t("CheckboxGroup",{model:{value:e.admin.processing,callback:function(t){e.$set(e.admin,"processing",t)},expression:"admin.processing"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.transfer&&e.buttonType.transfer.key}},[e._v(e._s(e.buttonType.transfer&&e.buttonType.transfer.description))]),t("Checkbox",{attrs:{label:e.buttonType.delayCompleted&&e.buttonType.delayCompleted.key}},[e._v(e._s(e.buttonType.delayCompleted&&e.buttonType.delayCompleted.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))]),t("Checkbox",{attrs:{label:e.buttonType.urging&&e.buttonType.urging.key}},[e._v(e._s(e.buttonType.urging&&e.buttonType.urging.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.supervisor.processing,callback:function(t){e.$set(e.supervisor,"processing",t)},expression:"supervisor.processing"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.transfer&&e.buttonType.transfer.key}},[e._v(e._s(e.buttonType.transfer&&e.buttonType.transfer.description))]),t("Checkbox",{attrs:{label:e.buttonType.delayCompleted&&e.buttonType.delayCompleted.key}},[e._v(e._s(e.buttonType.delayCompleted&&e.buttonType.delayCompleted.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))]),t("Checkbox",{attrs:{label:e.buttonType.urging&&e.buttonType.urging.key}},[e._v(e._s(e.buttonType.urging&&e.buttonType.urging.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.leader.processing,callback:function(t){e.$set(e.leader,"processing",t)},expression:"leader.processing"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.transfer&&e.buttonType.transfer.key}},[e._v(e._s(e.buttonType.transfer&&e.buttonType.transfer.description))]),t("Checkbox",{attrs:{label:e.buttonType.delayCompleted&&e.buttonType.delayCompleted.key}},[e._v(e._s(e.buttonType.delayCompleted&&e.buttonType.delayCompleted.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))]),t("Checkbox",{attrs:{label:e.buttonType.urging&&e.buttonType.urging.key}},[e._v(e._s(e.buttonType.urging&&e.buttonType.urging.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.feedbackStatus.completed))]),t("td",[t("CheckboxGroup",{model:{value:e.admin.completed,callback:function(t){e.$set(e.admin,"completed",t)},expression:"admin.completed"}},[t("Checkbox",{attrs:{label:e.buttonType.reopen&&e.buttonType.reopen.key}},[e._v(e._s(e.buttonType.reopen&&e.buttonType.reopen.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.supervisor.completed,callback:function(t){e.$set(e.supervisor,"completed",t)},expression:"supervisor.completed"}},[t("Checkbox",{attrs:{label:e.buttonType.reopen&&e.buttonType.reopen.key}},[e._v(e._s(e.buttonType.reopen&&e.buttonType.reopen.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.leader.completed,callback:function(t){e.$set(e.leader,"completed",t)},expression:"leader.completed"}},[t("Checkbox",{attrs:{label:e.buttonType.reopen&&e.buttonType.reopen.key}},[e._v(e._s(e.buttonType.reopen&&e.buttonType.reopen.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1)]),t("tr",[t("td",[e._v(e._s(e.feedbackStatus.delayCompleted))]),t("td",[t("CheckboxGroup",{model:{value:e.admin.delayCompleted,callback:function(t){e.$set(e.admin,"delayCompleted",t)},expression:"admin.delayCompleted"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.supervisor.delayCompleted,callback:function(t){e.$set(e.supervisor,"delayCompleted",t)},expression:"supervisor.delayCompleted"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1),t("td",[t("CheckboxGroup",{model:{value:e.leader.delayCompleted,callback:function(t){e.$set(e.leader,"delayCompleted",t)},expression:"leader.delayCompleted"}},[t("Checkbox",{attrs:{label:e.buttonType.completed&&e.buttonType.completed.key}},[e._v(e._s(e.buttonType.completed&&e.buttonType.completed.description))]),t("Checkbox",{attrs:{label:e.buttonType.public&&e.buttonType.public.key}},[e._v(e._s(e.buttonType.public&&e.buttonType.public.description))]),t("Checkbox",{attrs:{label:e.buttonType.output&&e.buttonType.output.key}},[e._v(e._s(e.buttonType.output&&e.buttonType.output.description))])],1)],1)])])]),t("div",{staticClass:"save-btn"},[t("Button",{attrs:{type:"primary",size:"large"},on:{click:e.doSave}},[e._v("保存修改")])],1),e.spinShow?t("Spin",{attrs:{size:"large",fix:""}}):e._e()],1)},X=[function(){var e=this,t=e._self._c;return t("th",{attrs:{id:"lineTd"}},[t("span",{staticStyle:{float:"left","margin-top":"20px","padding-left":"50px"}},[e._v("状态")]),t("span",{staticStyle:{float:"right","margin-top":"-10px","padding-right":"50px"}},[e._v("角色")])])}],Y={data:function(){return{refreshKey:(new Date).getTime(),buttonType:{},roleType:{},feedbackStatus:{},spinShow:!1,admin:{},supervisor:{},leader:{}}},created:function(){this.getRoleList()},methods:{getRoleList:function(){var e=this;this.spinShow=!0,r["getRoleList"]().then((function(t){e.spinShow=!1,e.roleType=t.roleType,e.buttonType=t.buttonType,e.feedbackStatus=t.feedbackStatus,e.admin=t.data.admin,e.supervisor=t.data.supervisor,e.leader=t.data.leader,e.refreshKey=(new Date).getTime()}))},doSave:function(){var e=this;this.spinShow=!0;var t={admin:this.admin,supervisor:this.supervisor,leader:this.leader};r["UpdateRole"](t).then((function(t){e.spinShow=!1,e.$Message.success(t)}))}}},Z=Y,ee=(n("4d4f"),Object(u["a"])(Z,Q,X,!1,null,"09e03553",null)),te=ee.exports,ne=function(){var e=this,t=e._self._c;return t("div",[t("Table",{ref:"table",attrs:{loading:e.loading,columns:e.columns,data:e.tableData},scopedSlots:e._u([{key:"des",fn:function(n){var o=n.row,a=n.index;return[e.rechristenIndex!==a?t("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e._v("\n "+e._s(o.des)+"\n "),t("Button",{staticStyle:{color:"#515a6e"},attrs:{ghost:"",type:"text",size:"small",icon:"ios-create-outline"},on:{click:function(t){return e.handleRechristen(o.des,a)}}})],1):t("div",[t("Input",{attrs:{placeholder:"请输入字段名"},model:{value:e.rechristenValue,callback:function(t){e.rechristenValue=t},expression:"rechristenValue"}},[t("Button",{attrs:{slot:"append",icon:"md-checkmark"},on:{click:function(t){return e.confirmRechristen(a)}},slot:"append"})],1)],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")]),t("div",{staticStyle:{"text-align":"center"}},[t("Button",{attrs:{type:"primary",loading:e.saveLoading},on:{click:e.update}},[e._v("\n 保存修改\n ")])],1)],1):e._e()],1)},oe=[],ae={data:function(){return{columns:[{type:"index",width:60,align:"center"},{key:"key",title:"字段名"},{slot:"des",title:"字段描述"}],tableData:[],rechristenIndex:void 0,rechristenValue:void 0,tipsFlag:!1,saveLoading:!1}},created:function(){this.getBtnList()},methods:{getBtnList:function(){var e=this;this.loading=!0,r["getBtnList"]().then((function(t){for(var n in e.loading=!1,t)e.tableData.push({key:n,des:t[n]})})).catch((function(t){e.loading=!1}))},handleRechristen:function(e,t){this.rechristenValue=e,this.rechristenIndex=t},confirmRechristen:function(e){this.tableData[e].des=this.rechristenValue,this.rechristenValue=this.rechristenIndex=void 0,this.tipsFlag=!0},update:function(){var e=this;this.saveLoading=!0,this.loading=!0;var t={};this.tableData.map((function(e){t[e.key]=e.des})),r["UpdateBtn"](t).then((function(t){e.saveLoading=!1,e.loading=!1,e.tipsFlag=!1,e.$Message.success(t)}))}}},ie=ae,le=Object(u["a"])(ie,ne,oe,!1,null,null,null),se=le.exports,re=function(){var e=this,t=e._self._c;return t("div",[t("Table",{ref:"table",attrs:{loading:e.loading,columns:e.columns,data:e.tableData},scopedSlots:e._u([{key:"des",fn:function(n){var o=n.row,a=n.index;return[e.rechristenIndex!==a?t("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[e._v("\n "+e._s(o.des)+"\n "),t("Button",{staticStyle:{color:"#515a6e"},attrs:{ghost:"",type:"text",size:"small",icon:"ios-create-outline"},on:{click:function(t){return e.handleRechristen(o.des,a)}}})],1):t("div",[t("Input",{attrs:{placeholder:"请输入字段名"},model:{value:e.rechristenValue,callback:function(t){e.rechristenValue=t},expression:"rechristenValue"}},[t("Button",{attrs:{slot:"append",icon:"md-checkmark"},on:{click:function(t){return e.confirmRechristen(a)}},slot:"append"})],1)],1)]}}])}),e.tipsFlag?t("div",{staticClass:"ivu-mt"},[t("Alert",{attrs:{type:"warning","show-icon":""}},[e._v("\n 修改配置后必须点击保存修改按钮,否则不生效\n ")]),t("div",{staticStyle:{"text-align":"center"}},[t("Button",{attrs:{type:"primary",loading:e.saveLoading},on:{click:e.update}},[e._v("\n 保存修改\n ")])],1)],1):e._e()],1)},ce=[],de={data:function(){return{columns:[{type:"index",width:60,align:"center"},{key:"key",title:"字段名"},{slot:"des",title:"字段描述"}],tableData:[],rechristenIndex:void 0,rechristenValue:void 0,tipsFlag:!1,saveLoading:!1}},created:function(){this.getBtnList()},methods:{getBtnList:function(){var e=this;this.loading=!0,r["getClassifyList"]().then((function(t){for(var n in e.loading=!1,t)e.tableData.push({key:n,des:t[n]})})).catch((function(t){e.loading=!1}))},handleRechristen:function(e,t){this.rechristenValue=e,this.rechristenIndex=t},confirmRechristen:function(e){this.tableData[e].des=this.rechristenValue,this.rechristenValue=this.rechristenIndex=void 0,this.tipsFlag=!0},update:function(){var e=this;this.saveLoading=!0,this.loading=!0;var t={};this.tableData.map((function(e){t[e.key]=e.des})),r["UpdateClassifyList"](t).then((function(t){e.saveLoading=!1,e.loading=!1,e.tipsFlag=!1,e.$Message.success(t)}))}}},ue=de,pe=Object(u["a"])(ue,re,ce,!1,null,null,null),he=pe.exports,be={data:function(){return{tabsData:[{label:"消息提醒配置",name:"messageSetting"},{label:"角色操作配置",name:"roleSetting"},{label:"功能按钮名称配置",name:"btnSetting"},{label:"栏目分类名称配置",name:"classifySetting"},{label:"默认公开配置",name:"settingOpen"}],selectTab:"messageSetting"}},components:{MessageSetting:A,OpenSetting:H,RoleSetting:te,BtnSetting:se,ClassifySetting:he}},me=be,ye=Object(u["a"])(me,V,P,!1,null,null,null),fe=ye.exports,ve={name:"setting-account",components:{fields:h,type:k,Selector:B,Formwork:O,OtherSetting:fe},data:function(){return{currentType:"type"}},methods:{handleChangeCell:function(e){this.currentType=e}}},ge=ve,_e=Object(u["a"])(ge,o,a,!1,null,null,null);t["default"]=_e.exports},"36fb":function(e,t,n){},"42cb":function(e,t,n){},"4a69":function(e,t,n){"use strict";n("3408")},"4d4f":function(e,t,n){"use strict";n("a434")},5430:function(e,t,n){"use strict";n("1dac")},"9bb7":function(e,t,n){"use strict";n("d390")},a434:function(e,t,n){},b46e:function(e,t,n){"use strict";n("42cb")},d390:function(e,t,n){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b9587"],{"330a":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[t("Card",{staticClass:"ivu-mb",attrs:{bordered:!1,"dis-hover":""}},[t("div",[t("DatePicker",{staticClass:"ivu-mr-8",staticStyle:{width:"200px"},attrs:{type:"daterange",placement:"bottom-end",placeholder:"请选择日期范围"},on:{"on-change":e.dateChange},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}}),t("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入关键字...",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getData.apply(null,arguments)}},model:{value:e.searchValue,callback:function(t){e.searchValue=t},expression:"searchValue"}}),t("Button",{staticClass:"ivu-ml-8",attrs:{type:"primary"},on:{click:e.doSearch}},[e._v("查找")])],1),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{border:"",columns:e.columns,data:e.tableData,height:e.tableHeight,loading:e.loading,stripe:"",size:"small"},scopedSlots:e._u([{key:"action",fn:function(a){var n=a.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return t.stopPropagation(),e.handleCheck(n)}}},[e._v("查看详情")])])]}}])}),t("div",{staticClass:"ivu-mt ivu-text-center"},[t("Page",{attrs:{transfer:!0,total:e.total,"show-total":"","show-elevator":"","show-sizer":"","class-name":"pagenation",current:e.pageIndex,"page-size":e.pageSize,"page-size-opts":[20,50,100,1e3]},on:{"on-change":e.handleCurrentChange,"on-page-size-change":e.handleSizeChange}})],1)],1)],1)},i=[],o=a("b6bd");function s(e){return Object(o["a"])({url:"/api/OperationLog/GetOperationLogList",method:"post",data:e})}var l={data:function(){return{searchValue:"",begin_time:"",end_time:"",date:"",pageIndex:1,pageSize:20,loading:!1,tableData:[],columns:[{title:"ip",key:"ip"},{title:"接口",key:"type"},{title:"api",key:"api"},{title:"请求方式",key:"method"},{title:"请求数据",key:"request",tooltip:!0},{title:"返回结束",key:"response",tooltip:!0},{title:"操作人",key:"user_name"},{title:"状态码",key:"code"},{title:"报错信息",key:"error msg"},{title:"请求时间",key:"createtime"},{title:"执行时间",key:"spend time"}],total:0}},computed:{tableHeight:function(){return document.body.clientHeight-270}},mounted:function(){this.getData()},methods:{getData:function(){var e=this,t={key_name:this.searchValue,begin_time:this.begin_time,end_time:this.end_time,page_index:this.pageIndex,page_size:this.pageSize};s(t).then((function(t){console.log(t),e.tableData=t.data,e.total=t.data_count}))},handleCurrentChange:function(e){this.pageIndex=e,this.getData()},handleSizeChange:function(e){this.pageSize=e,this.getData()},dateChange:function(e){this.begin_time=e[0],this.end_time=e[1]},doSearch:function(){this.pageIndex=1,this.getData()}}},r=l,c=a("2877"),d=Object(c["a"])(r,n,i,!1,null,"3f576884",null);t["default"]=d.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c913a"],{5834:function(e,t,a){"use strict";a.r(t);a("7f7f");var n=function(){var e=this,t=e._self._c;return t("div",[t("Card",{ref:"card",staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[t("Button",{attrs:{type:"primary",ghost:"",icon:"md-add"},on:{click:function(t){e.modal=!0}}},[e._v("\n 添加权限\n ")]),t("ButtonGroup",{staticClass:"ivu-ml-8",staticStyle:{display:"inline-flex"}},[t("Upload",{staticStyle:{display:"inline-flex"},attrs:{"before-upload":e.handleUpload,accept:"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",action:"/","show-upload-list":!1}},[t("Button",{staticStyle:{"border-radius":"4px 0 0 4px"},attrs:{type:"primary",loading:e.uploadLoading}},[e._v("\n 数据导入\n ")])],1),t("Tooltip",{attrs:{content:"模板下载",transfer:""}},[t("Button",{staticStyle:{"border-radius":"0 4px 4px 0"},attrs:{icon:"md-download",type:"primary",ghost:"",loading:e.downloadLoading},on:{click:e.handleDownTem}})],1)],1),t("div",{staticClass:"ivu-inline-block ivu-fr"},[t("RadioGroup",{attrs:{type:"button"},on:{"on-change":e.handleChangeRadio},model:{value:e.roleType,callback:function(t){e.roleType=t},expression:"roleType"}},[t("Radio",{attrs:{label:""}},[e._v("全部")]),t("Radio",{attrs:{label:0}},[e._v("管理员")]),t("Radio",{attrs:{label:5}},[e._v("教学部负责人")]),t("Radio",{attrs:{label:6}},[e._v("班干部")])],1)],1),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.list,loading:e.loading},scopedSlots:e._u([{key:"role",fn:function(a){var n=a.row;return e._l(n.role,(function(a,n){return t("p",{key:n},[t("Badge",{attrs:{color:1==a.roleType?"orange":2==a.roleType?"green":"blue",text:a.roleTypeLabel}}),e._v("\n "+e._s(a.feedback_type.length>0?" 负责:":"")+"\n "),e._l(a.feedback_type,(function(n,i){return t("span",{key:i},[e._v("\n "+e._s(n+(a.feedback_type.length-1===i?"":"、"))+"\n ")])}))],2)}))}},{key:"action",fn:function(a){var n=a.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleDel(n.user_id)}}},[e._v("删除")])])]}}])}),t("div",{staticClass:"ivu-mt ivu-text-center"},[t("Page",{attrs:{total:e.total,current:e.current,"show-total":"","show-sizer":"","show-elevator":"","page-size":e.limit},on:{"update:current":function(t){e.current=t},"on-change":e.handleChangePage,"on-page-size-change":e.handleChangePageSize}})],1)],1),t("Modal",{attrs:{title:"添加权限",loading:e.modalLoading},on:{"on-ok":e.handleAdd},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[t("Tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("TabPane",{attrs:{label:"教师",name:"teacher"}}),t("TabPane",{attrs:{label:"学生",name:"student"}})],1),t("h3",[e._v("选择人员")]),"teacher"==e.activeTab?t("Select",{staticStyle:{padding:"15px 0"},attrs:{filterable:"",placeholder:"输入姓名或部门搜索"},model:{value:e.teacher,callback:function(t){e.teacher=t},expression:"teacher"}},e._l(e.teacherList,(function(a,n){return t("Option",{key:n,attrs:{value:a.card_number+"`"+a.name,label:a.name}},[t("span",[e._v(e._s(a.name))]),t("span",{staticStyle:{float:"right",color:"#ccc"}},[e._v(e._s(a.dept_name))])])})),1):e._e(),"student"==e.activeTab?t("Select",{staticStyle:{padding:"15px 0"},attrs:{"remote-method":e.remoteMethod,loading:e.loading1,filterable:"",clearable:"",placeholder:"输入姓名或部门搜索"},model:{value:e.student,callback:function(t){e.student=t},expression:"student"}},e._l(e.studentList,(function(a){return t("Option",{key:a.card_number,attrs:{value:a.card_number+"`"+a.name,label:a.name}},[t("span",[e._v(e._s(a.name))]),t("span",{staticStyle:{float:"right",color:"#ccc"}},[e._v(e._s(a.class_name))])])})),1):e._e(),"teacher"==e.activeTab?t("h3",[e._v("选择权限")]):e._e(),"teacher"==e.activeTab?t("CheckboxGroup",{staticStyle:{display:"flex","flex-direction":"column"},on:{"on-change":e.handleChangeCheckbox},model:{value:e.role,callback:function(t){e.role=t},expression:"role"}},[t("div",{staticStyle:{padding:"15px 0"}},[t("Checkbox",{attrs:{label:"admin",border:""}},[e._v("管理员")])],1),t("div",{staticStyle:{padding:"15px 0"}},[t("Checkbox",{attrs:{label:"supervisor",border:""}},[e._v("教学负责人")]),t("Select",{staticStyle:{width:"355px"},attrs:{multiple:"",disabled:e.supervisorDisabled},model:{value:e.supervisorRole,callback:function(t){e.supervisorRole=t},expression:"supervisorRole"}},e._l(e.deptList,(function(a){return t("Option",{key:a.id,attrs:{value:a.id}},[e._v("\n "+e._s(a.label)+"\n ")])})),1)],1)]):e._e()],1),t("Modal",{attrs:{width:"360"},model:{value:e.uploadErrModal,callback:function(t){e.uploadErrModal=t},expression:"uploadErrModal"}},[t("p",{staticStyle:{color:"#f60","text-align":"center"},attrs:{slot:"header"},slot:"header"},[t("Icon",{attrs:{type:"ios-information-circle"}}),t("span",[e._v("导入失败")])],1),t("div",{staticStyle:{"text-align":"center"}},[t("h2",[e._v("\n 导入信息有误\n ")])]),t("div",{attrs:{slot:"footer"},slot:"footer"},[t("Button",{attrs:{type:"error",size:"large",long:""},on:{click:e.downloadErr}},[e._v("下载错误数据")])],1)])],1)},i=[],o=(a("28a5"),a("20d6"),a("7274")),l=a("b6bd");function r(e){return Object(l["a"])({url:"/daily_behavior/api/Permission/TeacherByKeyWord",method:"get",params:e})}var s={data:function(){return{roleType:"",columns:[{type:"index",width:60,align:"center"},{title:"卡号",key:"user_id",width:150},{title:"姓名",key:"user_name",width:150},{title:"权限",slot:"role",minWidth:200},{title:"管理范围",key:"departments",minWidth:200},{title:"操作",slot:"action",width:150,align:"center"}],loading:!1,list:[],current:1,limit:10,total:0,modal:!1,modalLoading:!0,teacherList:[],teacher:void 0,role:[],feedbackTypeList:[],supervisorDisabled:!0,supervisorRole:[],leaderDisabled:!0,leaderRole:[],downloadLoading:!1,uploadErrModal:!1,err_path:"",uploadLoading:!1,deptList:[],studentList:[],student:void 0,activeTab:"teacher",loading1:!1}},created:function(){var e=this;r().then((function(t){e.teacherList=t})),Object(o["l"])({user_flag:1}).then((function(t){e.feedbackTypeList=t})),Object(o["g"])().then((function(t){e.deptList=t})),this.getData()},methods:{getData:function(){var e=this;this.loading||(this.loading=!0,Object(o["q"])({keyWord:"",roleType:this.roleType,pageIndex:this.current,pageSize:this.limit}).then((function(t){e.list=t.data,e.current=t.pageIndex,e.total=t.dataCount,e.loading=!1})))},handleChangeRadio:function(e){this.getData()},handleChangePage:function(e){this.current=e,this.getData()},handleChangePageSize:function(e){this.current=1,this.limit=e,this.getData()},handleDel:function(e){var t=this;this.$Modal.confirm({title:"确定要删除吗?",onOk:function(){Object(o["p"])({user_id:e}).then((function(){t.$Message.success("删除成功"),t.getData()}))}})},handleChangeCheckbox:function(e){this.supervisorDisabled=-1===e.findIndex((function(e){return"supervisor"===e})),this.leaderDisabled=-1===e.findIndex((function(e){return"leader"===e}))},handleAdd:function(){var e=this;if("teacher"==this.activeTab)if(this.teacher&&0!==this.role.length){for(var t=[],a=0;a<this.role.length;a++){var n=this.role[a];switch(n){case"admin":t.push({role_type:0,departments:[]});break;case"supervisor":if(0===this.supervisorRole.length)return this.handleModalLoading(),void this.$Message.warning("请选择教师督导负责的反馈类型");t.push({role_type:5,departments:this.supervisorRole});break}}var i={user_id:this.teacher.split("`")[0],user_name:this.teacher.split("`")[1],role:t};Object(o["o"])(i).then((function(){e.teacher=void 0,e.supervisorDisabled=e.leaderDisabled=!0,e.role=e.supervisorRole=e.leaderRole=[],e.getData(),e.modal=!1,e.$Message.success("添加成功")}))}else this.handleModalLoading(),this.$Message.warning("请选择");else if(this.student){var l={user_id:this.student.split("`")[0],user_name:this.student.split("`")[1]};Object(o["b"])(l).then((function(){e.student=void 0,e.getData(),e.modal=!1,e.$Message.success("添加成功")}))}else this.handleModalLoading(),this.$Message.warning("请选择")},handleModalLoading:function(){var e=this;this.modalLoading=!1,this.$nextTick((function(){e.modalLoading=!0}))},handleDownTem:function(){var e=this;this.downloadLoading=!0,Object(o["d"])().then((function(t){e.downloadLoading=!1,window.location.href=t})).catch((function(t){e.downloadLoading=!1}))},handleUpload:function(e){var t=this;this.uploadLoading=!0;var a=new FormData;return a.append("file",e),Object(o["c"])(a).then((function(e){t.uploadLoading=!1,e.import_status?t.$Message.success("导入成功"):(t.err_path=e.err_path,t.uploadErrModal=!0,t.$Message.erroe("导入失败")),t.getData()})).catch((function(e){t.uploadLoading=!1})),!1},downloadErr:function(){window.location.href=this.err_path},remoteMethod:function(e){var t=this;""!==e?(this.loading1=!0,Object(o["h"])({keyWord:e}).then((function(e){t.loading1=!1,t.studentList=e}))):this.studentList=[]}}},d=s,c=a("2877"),u=Object(c["a"])(d,n,i,!1,null,null,null);t["default"]=u.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22ca54"],{f3b3:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"i-table-no-border"},[t("Card",{attrs:{bordered:!1,"dis-hover":""}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("Avatar",{directives:[{name:"color",rawName:"v-color",value:"#2f54eb",expression:"'#2f54eb'"},{name:"bg-color",rawName:"v-bg-color",value:"#f0f5ff",expression:"'#f0f5ff'"}],attrs:{icon:"md-locate",size:"small"}}),t("span",{staticClass:"ivu-pl-8"},[e._v("前端日志")])],1),t("div",{attrs:{slot:"extra"},slot:"extra"},[t("Tooltip",{attrs:{content:"清空日志",placement:"top"}},[t("Button",{attrs:{type:"text"},on:{click:e.clean}},[t("Icon",{attrs:{type:"md-trash",size:"16"}})],1)],1)],1),t("Table",{attrs:{columns:e.columns,data:e.log},scopedSlots:e._u([{key:"page",fn:function(t){var r=t.row;return[e._v("\n "+e._s(e.get(r,"meta.url"))+"\n ")]}},{key:"type",fn:function(r){var o=r.row;return["info"===o.type?t("Tag",{attrs:{color:"blue"}},[e._v("info")]):e._e(),"success"===o.type?t("Tag",{attrs:{color:"green"}},[e._v("success")]):e._e(),"warning"===o.type?t("Tag",{attrs:{color:"orange"}},[e._v("warning")]):e._e(),"error"===o.type?t("Tag",{attrs:{color:"red"}},[e._v("error")]):e._e()]}},{key:"more",fn:function(r){var o=r.row;return[t("Button",{attrs:{type:"primary"},on:{click:function(t){return e.handleMore(o)}}},[e._v("查看")])]}}])})],1)],1)},n=[],a=(r("8e6e"),r("ac6a"),r("456d"),r("ade3")),s=r("2f62"),c=r("2ef0");function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){Object(a["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u={name:"log",data:function(){return{columns:[{title:"时间",key:"time",width:180},{title:"信息",key:"message",minWidth:300},{title:"触发页面",slot:"page",minWidth:300},{title:"类型",width:100,slot:"type"},{title:"详细信息",width:100,slot:"more"}]}},computed:i({},Object(s["e"])("admin/log",["log"])),methods:i(i({},Object(s["d"])("admin/log",["clean"])),{},{get:c["get"],handleMore:function(e){this.$Notice.info({title:"提示",desc:"请在浏览器控制台查看完整日志"}),this.$log.capsule("iView Admin","完整日志内容","primary"),console.group("完整日志"),console.log("message ",e.message),console.log("time: ",e.time),console.log("type: ",e.type),console.log("meta: ",e.meta),console.groupEnd()}})},p=u,f=r("2877"),d=Object(f["a"])(p,o,n,!1,null,null,null);t["default"]=d.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e770356"],{"3e1a":function(e,t,a){},"4a50":function(e,t,a){"use strict";a.r(t);a("7f7f");var n=function(){var e=this,t=e._self._c;return t("div",[t("Card",{ref:"card",staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[t("Button",{attrs:{type:"primary",ghost:"",icon:"md-add"},on:{click:function(t){e.modal=!0}}},[e._v("\n 添加角色\n ")]),t("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:e.columns,data:e.tableData,loading:e.loading},scopedSlots:e._u([{key:"action",fn:function(a){var n=a.row;return[t("div",{on:{click:function(e){e.stopPropagation(),e.preventDefault()}}},[t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleEdit(n)}}},[e._v("编辑")]),t("Divider",{attrs:{type:"vertical"}}),t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleMenu(n)}}},[e._v("菜单权限")]),t("Divider",{attrs:{type:"vertical"}}),t("a",{attrs:{type:"text"},on:{click:function(t){return e.handleDelete(n.id)}}},[e._v("删除")])],1)]}}])})],1),t("Modal",{attrs:{title:"添加角色",loading:e.modalLoading},on:{"on-ok":e.handleAdd},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[t("h3",{staticStyle:{"margin-bottom":"5px"}},[e._v("角色名称")]),t("Input",{attrs:{placeholder:"请输入角色名称"},model:{value:e.roleName,callback:function(t){e.roleName=t},expression:"roleName"}})],1),t("Modal",{attrs:{title:"编辑角色",loading:e.modalLoading},on:{"on-ok":e.saveEdit},model:{value:e.editModal,callback:function(t){e.editModal=t},expression:"editModal"}},[t("h3",{staticStyle:{"margin-bottom":"5px"}},[e._v("角色名称")]),t("Input",{attrs:{placeholder:"请输入角色名称"},model:{value:e.editName,callback:function(t){e.editName=t},expression:"editName"}})],1),t("Modal",{attrs:{title:"分配菜单",loading:e.modalLoading},on:{"on-ok":e.saveMenu},model:{value:e.menuModal,callback:function(t){e.menuModal=t},expression:"menuModal"}},[t("CheckboxGroup",{model:{value:e.userMenu,callback:function(t){e.userMenu=t},expression:"userMenu"}},e._l(e.menuData,(function(a){return t("Checkbox",{key:a.id,attrs:{label:a.id,border:""}},[e._v(e._s(a.name))])})),1)],1)],1)},i=[],o=(a("8e6e"),a("ac6a"),a("456d"),a("7514"),a("ade3")),l=a("7274");function d(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?d(Object(a),!0).forEach((function(t){Object(o["a"])(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var s={data:function(){return{modal:!1,editModal:!1,modalLoading:!0,searchValue:"",loading:!1,roleName:"",editName:"",tableData:[],roleId:"",columns:[{type:"index",title:"序号",align:"center",width:150},{title:"名称",key:"role_name"},{title:"操作",slot:"action",align:"center",fixed:"right"}],menuModal:!1,menuData:[],userMenu:[],editRow:{}}},created:function(){this.getData(),this.getMenuData()},methods:{getData:function(){var e=this,t={page_index:1,page_size:100,key:this.searchValue};this.loading=!0,l["e"](t).then((function(t){e.loading=!1,e.tableData=t.data}))},getMenuData:function(){var e=this;l["d"]().then((function(t){e.menuData=t}))},handleAdd:function(){var e=this;if(""==this.roleName)this.handleModalLoading(),this.$Message.warning("请输入角色名称");else{var t={role_name:this.roleName,capacity_info:[]};l["q"](t).then((function(t){e.modal=!1,e.$Message.success("添加成功"),e.roleName="",e.getData()})).catch((function(){e.handleModalLoading()}))}},handleEdit:function(e){this.editName=e.role_name,this.roleId=e.id,this.editRow=e,this.editModal=!0},saveEdit:function(){var e=this;if(""==this.editName)this.handleModalLoading(),this.$Message.warning("请输入角色名称");else{var t=r(r({},this.editRow),{},{role_name:this.editName,id:this.roleId});l["q"](t).then((function(t){e.editModal=!1,e.$Message.success("编辑成功"),e.editName="",e.getData()})).catch((function(){e.handleModalLoading()}))}},handleDelete:function(e){var t=this;this.$Modal.confirm({title:"确定要删除当前角色吗?",loading:!0,onOk:function(){var a={id:e,is_del:1};l["p"](a).then((function(){t.$Modal.remove(),t.$Message.success("删除成功"),t.getData()}))}})},handleMenu:function(e){this.editName=e.role_name,this.roleId=e.id,this.editRow=e,this.menuModal=!0,this.userMenu=e.capacity_info.map((function(e){return e.id}))},saveMenu:function(){var e=this,t=[];this.userMenu.map((function(a){t.push(e.menuData.find((function(e){return e.id==a})))}));var a=r(r({},this.editRow),{},{role_name:this.editName,id:this.roleId,capacity_id:this.userMenu.join(","),capacity_info:t});l["q"](a).then((function(t){e.menuModal=!1,e.$Message.success("分配成功"),e.getData()})).catch((function(t){e.handleModalLoading()}))},handleModalLoading:function(){var e=this;this.modalLoading=!1,this.$nextTick((function(){e.modalLoading=!0}))}}},c=s,u=(a("96f6"),a("2877")),h=Object(u["a"])(c,n,i,!1,null,"364e43c7",null);t["default"]=h.exports},"96f6":function(e,t,a){"use strict";a("3e1a")}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25c44ce4"],{b4e8:function(t,e,a){},ba6e:function(t,e,a){"use strict";a.r(e);a("7f7f");var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ele-body"},[e("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t.loading?e("Spin",{attrs:{fix:""}}):t._e(),e("div",{staticClass:"table-heard"},[e("Tag",{attrs:{size:"large"}},[t._v(t._s(this.currentWeekRange[0]+"至"+this.currentWeekRange[1]))]),e("div",{staticClass:"center"},[e("Button",{attrs:{size:"default"},on:{click:t.weekPre}},[e("Icon",{attrs:{type:"ios-arrow-back"}}),t._v("上一周\n ")],1),e("p",[t._v(t._s(t.currentYear)+"年"+t._s(t.currentMonth)+"月")]),e("Button",{attrs:{size:"default"},on:{click:t.weekNext}},[t._v("下一周\n "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1),e("div")],1),e("table",{attrs:{align:"center",cellpadding:"0",cellspacing:"0"}},[e("tr",{staticClass:"sepacialy"},[e("td"),t._l(t.weekGround,(function(a,n){return e("td",{key:n},[t._v(t._s(a))])}))],2),t._l(t.timeGround,(function(a,n){return e("tr",{key:n},[e("td",{staticClass:"time"},[t._v(t._s(a))]),t._l(t.weekGround,(function(a,i){return e("td",{key:i,attrs:{align:"center",valign:"middle"}},t._l(t.course[i].dutydatas,(function(a,o){return e("div",{key:o,on:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[a.duty_type_name===t.timeGround[n]?e("div",{staticClass:"course-item"},[e("p",[a.duty_daytime_people?e("Tag",{staticStyle:{height:"auto"},attrs:{color:"blue"},nativeOn:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[t._v("白天:"+t._s(a.duty_daytime_people))]):t._e()],1),e("p",[a.duty_night_people?e("Tag",{staticStyle:{height:"auto"},attrs:{color:"red"},nativeOn:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[t._v("晚上:"+t._s(a.duty_night_people))]):t._e()],1)]):t._e()])})),0)}))],2)}))],2)],1),e("Modal",{staticClass:"add-modal",attrs:{width:"50%",title:"值班安排",loading:t.modalLoading},on:{"on-ok":t.handleConfirm,"on-cancel":t.handleClose},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("Form",{ref:"form",attrs:{model:t.formData,rules:t.formRule,"label-width":150}},[e("FormItem",{attrs:{label:"分类名称"}},[e("Input",{attrs:{disabled:""},model:{value:t.selectItem.duty_type_name,callback:function(e){t.$set(t.selectItem,"duty_type_name",e)},expression:"selectItem.duty_type_name"}})],1),e("FormItem",{attrs:{label:"值班日期"}},[e("Input",{attrs:{disabled:""},model:{value:t.selectDate,callback:function(e){t.selectDate=e},expression:"selectDate"}})],1),e("FormItem",{attrs:{label:"白天值班人员"}},[e("Select",{attrs:{filterable:"",multiple:""},model:{value:t.duty_daytime_people_id,callback:function(e){t.duty_daytime_people_id=e},expression:"duty_daytime_people_id"}},t._l(t.peopleOption,(function(a){return e("Option",{key:a.id,attrs:{value:a.id,label:a.name}},[e("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e("p",[t._v(t._s(a.name)+"\n "),e("span",{staticStyle:{color:"#9a9a9a"}},[t._v("("+t._s(a.card)+")")])]),e("p",{staticStyle:{color:"#ccc"}},[t._v(t._s(a.dept_name))])])])})),1)],1),e("FormItem",{attrs:{label:"晚上值班人员"}},[e("Select",{attrs:{filterable:"",multiple:""},model:{value:t.duty_night_people_id,callback:function(e){t.duty_night_people_id=e},expression:"duty_night_people_id"}},t._l(t.peopleOption,(function(a){return e("Option",{key:a.id,attrs:{value:a.id,label:a.name}},[e("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e("p",[t._v(t._s(a.name)+"\n "),e("span",{staticStyle:{color:"#9a9a9a"}},[t._v("("+t._s(a.card)+")")])]),e("p",{staticStyle:{color:"#ccc"}},[t._v(t._s(a.dept_name))])])])})),1)],1)],1)],1)],1)},i=[],o=(a("ac6a"),a("b6bd"));function s(t){return Object(o["a"])({url:"/api/DutyRecord/GetDutyArrangeByDateList",method:"get",params:t})}function r(t){return Object(o["a"])({url:"/api/Common/GetPersonByCondiction",method:"get",params:t})}function c(t){return Object(o["a"])({url:"/api/DutyRecord/DutyArrangeIns",method:"post",data:t})}var l={props:{},data:function(){return{weekGround:["周一","周二","周三","周四","周五","周六","周日"],course:[],timeGround:[],currentYear:"",currentMonth:"",currentDay:"",currentWeek:"",days:[],currentWeekRange:[],defalultWeekGround:["周一","周二","周三","周四","周五","周六","周日"],coachColorMap:{"张三":"#2B2E4A","李四":"#521262","王五":"#903749"},loading:!1,showModal:!1,selectDate:"",selectItem:"",formData:{},formRule:{},peopleOption:[],duty_daytime_people_id:[],duty_night_people_id:[],modalLoading:!0}},created:function(){},mounted:function(){this.initData(),this.GetPersonByCondiction()},methods:{getData:function(){var t=this,e={begin:this.currentWeekRange[0],end:this.currentWeekRange[1]};this.loading=!0,s(e).then((function(e){t.loading=!1,t.timeGround=[],t.course=e,t.course[0].dutydatas.forEach((function(e){t.timeGround.push(e.duty_type_name)}))}))},formatDate:function(t,e,a){var n=t,i=e;i<10&&(i="0".concat(i));var o=a;return o<10&&(o="0".concat(o)),"".concat(n,"-").concat(i,"-").concat(o)},initData:function(t){var e=this,a="";a=t?new Date(t):new Date,this.currentDay=a.getDate(),this.currentYear=a.getFullYear(),this.currentMonth=a.getMonth()+1,this.currentWeek=a.getDay(),0===this.currentWeek&&(this.currentWeek=7);var n=this.formatDate(this.currentYear,this.currentMonth,this.currentDay);this.days.length=0;for(var i=this.currentWeek-1;i>=0;i-=1){var o=new Date(n);o.setDate(o.getDate()-i),this.days.push(o)}for(var s=1;s<=7-this.currentWeek;s+=1){var r=new Date(n);r.setDate(r.getDate()+s),this.days.push(r)}this.currentWeekRange=[this.formatDate(this.days[0].getFullYear(),this.days[0].getMonth()+1,this.days[0].getDate()),this.formatDate(this.days[6].getFullYear(),this.days[6].getMonth()+1,this.days[6].getDate())];var c=[];this.days.forEach((function(t){c.push("".concat(t.getMonth()+1,"/").concat(t.getDate()))})),this.defalultWeekGround.map((function(t,a){e.weekGround[a]=t+"(".concat(c[a],")")})),this.getData()},weekPre:function(){var t=this.days[0];t.setDate(t.getDate()-7),this.initData(t)},weekNext:function(){var t=this.days[6];t.setDate(t.getDate()+7),this.initData(t)},GetPersonByCondiction:function(){var t=this,e={page_index:1,page_size:1e4};r(e).then((function(e){t.peopleOption=e.data}))},clickCell:function(t,e){this.selectDate=e,this.selectItem=t,this.duty_daytime_people_id=t.duty_daytime_people_list.map((function(t){return t.id})),this.duty_night_people_id=t.duty_night_people_list.map((function(t){return t.id})),this.showModal=!0},handleConfirm:function(){var t=this,e={duty_type_id:this.selectItem.duty_type_id,date:this.selectDate,record_id:this.selectItem.record_id,duty_daytime_people_id:this.duty_daytime_people_id,duty_night_people_id:this.duty_night_people_id};console.log(e),c(e).then((function(e){t.handleModalLoading(),t.showModal=!1,t.$Message.success("安排成功"),t.duty_daytime_people_id=[],t.duty_night_people_id=[],t.getData()})).catch((function(){t.handleModalLoading()}))},handleModalLoading:function(){var t=this;this.modalLoading=!1,this.$nextTick((function(){t.modalLoading=!0}))},handleClose:function(){this.duty_daytime_people_id=[],this.duty_night_people_id=[]}},computed:{}},d=l,u=(a("bbfb"),a("2877")),_=Object(u["a"])(d,n,i,!1,null,"50c67b16",null);e["default"]=_.exports},bbfb:function(t,e,a){"use strict";a("b4e8")}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ed56c22e"],{b4e8:function(t,e,a){},ba6e:function(t,e,a){"use strict";a.r(e);a("7f7f");var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ele-body"},[e("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t.loading?e("Spin",{attrs:{fix:""}}):t._e(),e("div",{staticClass:"table-heard"},[e("Tag",{attrs:{size:"large"}},[t._v(t._s(this.currentWeekRange[0]+"至"+this.currentWeekRange[1]))]),e("div",{staticClass:"center"},[e("Button",{attrs:{size:"default"},on:{click:t.weekPre}},[e("Icon",{attrs:{type:"ios-arrow-back"}}),t._v("上一周\n ")],1),e("p",[t._v(t._s(t.currentYear)+"年"+t._s(t.currentMonth)+"月")]),e("Button",{attrs:{size:"default"},on:{click:t.weekNext}},[t._v("下一周\n "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1),e("div")],1),e("table",{attrs:{align:"center",cellpadding:"0",cellspacing:"0"}},[e("tr",{staticClass:"sepacialy"},[e("td"),t._l(t.weekGround,(function(a,n){return e("td",{key:n},[t._v(t._s(a))])}))],2),t._l(t.timeGround,(function(a,n){return e("tr",{key:n},[e("td",{staticClass:"time"},[t._v(t._s(a))]),t._l(t.weekGround,(function(a,i){return e("td",{key:i,attrs:{align:"center",valign:"middle"}},t._l(t.course[i].dutydatas,(function(a,o){return e("div",{key:o,on:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[a.duty_type_name===t.timeGround[n]?e("div",{staticClass:"course-item"},[e("p",[a.duty_daytime_people?e("Tag",{staticStyle:{height:"auto"},attrs:{color:"blue"},nativeOn:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[t._v("白天:"+t._s(a.duty_daytime_people))]):t._e()],1),e("p",[a.duty_night_people?e("Tag",{staticStyle:{height:"auto"},attrs:{color:"red"},nativeOn:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[t._v("晚上:"+t._s(a.duty_night_people))]):t._e()],1)]):t._e()])})),0)}))],2)}))],2)],1),e("Modal",{staticClass:"add-modal",attrs:{width:"50%",title:"值班安排",loading:t.modalLoading},on:{"on-ok":t.handleConfirm,"on-cancel":t.handleClose},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("Form",{ref:"form",attrs:{model:t.formData,rules:t.formRule,"label-width":150}},[e("FormItem",{attrs:{label:"分类名称"}},[e("Input",{attrs:{disabled:""},model:{value:t.selectItem.duty_type_name,callback:function(e){t.$set(t.selectItem,"duty_type_name",e)},expression:"selectItem.duty_type_name"}})],1),e("FormItem",{attrs:{label:"值班日期"}},[e("Input",{attrs:{disabled:""},model:{value:t.selectDate,callback:function(e){t.selectDate=e},expression:"selectDate"}})],1),e("FormItem",{attrs:{label:"白天值班人员"}},[e("Select",{attrs:{filterable:"",multiple:""},model:{value:t.duty_daytime_people_id,callback:function(e){t.duty_daytime_people_id=e},expression:"duty_daytime_people_id"}},t._l(t.peopleOption,(function(a){return e("Option",{key:a.id,attrs:{value:a.id,label:a.name}},[e("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e("p",[t._v(t._s(a.name)+"\n "),e("span",{staticStyle:{color:"#9a9a9a"}},[t._v("("+t._s(a.card)+")")])]),e("p",{staticStyle:{color:"#ccc"}},[t._v(t._s(a.dept_name))])])])})),1)],1),e("FormItem",{attrs:{label:"晚上值班人员"}},[e("Select",{attrs:{filterable:"",multiple:""},model:{value:t.duty_night_people_id,callback:function(e){t.duty_night_people_id=e},expression:"duty_night_people_id"}},t._l(t.peopleOption,(function(a){return e("Option",{key:a.id,attrs:{value:a.id,label:a.name}},[e("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e("p",[t._v(t._s(a.name)+"\n "),e("span",{staticStyle:{color:"#9a9a9a"}},[t._v("("+t._s(a.card)+")")])]),e("p",{staticStyle:{color:"#ccc"}},[t._v(t._s(a.dept_name))])])])})),1)],1)],1)],1)],1)},i=[],o=(a("ac6a"),a("e191")),r={props:{},data:function(){return{weekGround:["周一","周二","周三","周四","周五","周六","周日"],course:[],timeGround:[],currentYear:"",currentMonth:"",currentDay:"",currentWeek:"",days:[],currentWeekRange:[],defalultWeekGround:["周一","周二","周三","周四","周五","周六","周日"],coachColorMap:{"张三":"#2B2E4A","李四":"#521262","王五":"#903749"},loading:!1,showModal:!1,selectDate:"",selectItem:"",formData:{},formRule:{},peopleOption:[],duty_daytime_people_id:[],duty_night_people_id:[],modalLoading:!0}},created:function(){},mounted:function(){this.initData(),this.GetPersonByCondiction()},methods:{getData:function(){var t=this,e={begin:this.currentWeekRange[0],end:this.currentWeekRange[1]};this.loading=!0,Object(o["b"])(e).then((function(e){t.loading=!1,t.timeGround=[],t.course=e,t.course[0].dutydatas.forEach((function(e){t.timeGround.push(e.duty_type_name)}))}))},formatDate:function(t,e,a){var n=t,i=e;i<10&&(i="0".concat(i));var o=a;return o<10&&(o="0".concat(o)),"".concat(n,"-").concat(i,"-").concat(o)},initData:function(t){var e=this,a="";a=t?new Date(t):new Date,this.currentDay=a.getDate(),this.currentYear=a.getFullYear(),this.currentMonth=a.getMonth()+1,this.currentWeek=a.getDay(),0===this.currentWeek&&(this.currentWeek=7);var n=this.formatDate(this.currentYear,this.currentMonth,this.currentDay);this.days.length=0;for(var i=this.currentWeek-1;i>=0;i-=1){var o=new Date(n);o.setDate(o.getDate()-i),this.days.push(o)}for(var r=1;r<=7-this.currentWeek;r+=1){var s=new Date(n);s.setDate(s.getDate()+r),this.days.push(s)}this.currentWeekRange=[this.formatDate(this.days[0].getFullYear(),this.days[0].getMonth()+1,this.days[0].getDate()),this.formatDate(this.days[6].getFullYear(),this.days[6].getMonth()+1,this.days[6].getDate())];var c=[];this.days.forEach((function(t){c.push("".concat(t.getMonth()+1,"/").concat(t.getDate()))})),this.defalultWeekGround.map((function(t,a){e.weekGround[a]=t+"(".concat(c[a],")")})),this.getData()},weekPre:function(){var t=this.days[0];t.setDate(t.getDate()-7),this.initData(t)},weekNext:function(){var t=this.days[6];t.setDate(t.getDate()+7),this.initData(t)},GetPersonByCondiction:function(){var t=this,e={page_index:1,page_size:1e4};Object(o["c"])(e).then((function(e){t.peopleOption=e.data}))},clickCell:function(t,e){this.selectDate=e,this.selectItem=t,this.duty_daytime_people_id=t.duty_daytime_people_list.map((function(t){return t.id})),this.duty_night_people_id=t.duty_night_people_list.map((function(t){return t.id})),this.showModal=!0},handleConfirm:function(){var t=this,e={duty_type_id:this.selectItem.duty_type_id,date:this.selectDate,record_id:this.selectItem.record_id,duty_daytime_people_id:this.duty_daytime_people_id,duty_night_people_id:this.duty_night_people_id};console.log(e),Object(o["a"])(e).then((function(e){t.handleModalLoading(),t.showModal=!1,t.$Message.success("安排成功"),t.duty_daytime_people_id=[],t.duty_night_people_id=[],t.getData()})).catch((function(){t.handleModalLoading()}))},handleModalLoading:function(){var t=this;this.modalLoading=!1,this.$nextTick((function(){t.modalLoading=!0}))},handleClose:function(){this.duty_daytime_people_id=[],this.duty_night_people_id=[]}},computed:{}},s=r,c=(a("bbfb"),a("2877")),d=Object(c["a"])(s,n,i,!1,null,"50c67b16",null);e["default"]=d.exports},bbfb:function(t,e,a){"use strict";a("b4e8")},e191:function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return r}));var n=a("b6bd");function i(t){return Object(n["a"])({url:"/api/DutyRecord/GetDutyArrangeByDateList",method:"get",params:t})}function o(t){return Object(n["a"])({url:"/api/Common/GetPersonByCondiction",method:"get",params:t})}function r(t){return Object(n["a"])({url:"/api/DutyRecord/DutyArrangeIns",method:"post",data:t})}}}]);
\ No newline at end of file \ No newline at end of file
import request from '@/plugins/request';
export function GetOperationLogList(data) {
return request({
url: '/api/OperationLog/GetOperationLogList',
method: 'post',
data: data
});
}
\ No newline at end of file
import request from '@/plugins/request'; import request from '@/plugins/request';
// 反馈类型 // 获取角色列表
export function OptionList(data) { export function GetRoleList(data) {
return request({ return request({
url: '/daily_behavior/api/Option/TypeList', url: '/api/UserRole/GetRoleList',
method: 'get', method: 'get',
params: data params: data
}); });
} }
// 获取所有菜单列表
export function OptionAdd(data) { export function GetCapacitySelect(data) {
return request({
url: '/daily_behavior/api/Option/Add',
method: 'post',
data: data
});
}
export function OptionUpdate(data) {
return request({ return request({
url: '/daily_behavior/api/Option/Update', url: '/api/Common/GetCapacitySelect',
method: 'post', method: 'get',
data: data params: data
});
}
export function OptionEnable(id) {
return request({
url: `/daily_behavior/api/Option/StartOrStop/${id}`,
method: 'post',
}); });
} }
export function OptionSort(data) { // 新增角色,编辑角色,编辑菜单
export function RoleSave(data) {
return request({ return request({
url: '/daily_behavior/api/Option/Sort', url: '/api/UserRole/RoleSave',
method: 'post', method: 'post',
data: data data: data
}); });
} }
export function AddOrReduceList(data) { // 删除角色
export function RoleDel(data) {
return request({ return request({
url: '/daily_behavior/api/Option/AddOrReduceList', url: '/api/UserRole/RoleDel',
method: 'get', method: 'get',
params: data params: data
}); });
} }
export function OptionDelete(id) { // 获取用户权限列表
return request({ export function GetUserRoleList(data) {
url: '/daily_behavior/api/Option/Delete/' + id,
method: 'post'
});
}
//反馈表单
export function FormFieldList(data) {
return request({ return request({
url: '/daily_behavior/api/Config/FormField/List', url: '/api/UserRole/GetUserRoleList',
method: 'get', method: 'get',
params: data params: data
}); });
} }
export function FormFieldUpdate(data, type) { // 获取角色列表
export function GetRoleSelect(data) {
return request({ return request({
url: `/daily_behavior/api/Config/FormField/Update/${type}`, url: '/api/Common/GetRoleSelect',
method: 'post',
data: data
});
}
//权限设置
export function PermissionList(data) {
return request({
url: '/daily_behavior/api/Permission/List',
method: 'get', method: 'get',
params: data params: data
}); });
} }
export function PermissionDelete(data) {
return request({
url: '/daily_behavior/api/Permission/Delete',
method: 'post',
params: data
});
}
export function PermissionRoleType() { // 保存用户权限
return request({ export function UserRoleSave(data) {
url: '/daily_behavior/api/Permission/RoleType',
method: 'get'
});
}
export function PermissionAdd(data) {
return request({
url: '/daily_behavior/api/Permission/Add',
method: 'post',
data: data
});
}
//下载学生干部导入模板
export function DownStudentCadreImportModel(data) {
return request({
url: '/daily_behavior/api/Permission/DownStudentCadreImportModel',
method: 'get',
params: data
});
}
//导入学生干部
export function CreateStudentCadreByExcel(data) {
return request({ return request({
url: '/daily_behavior/api/Permission/CreateStudentCadreByExcel', url: '/api/UserRole/UserRoleSave',
method: 'post', method: 'post',
data: data data: data
}); });
} }
//获取院系列表
export function GetDepartment(data) { // 用户权限删除
return request({ export function UserRoleDel(data) {
url: '/daily_behavior/api/Permission/GetDepartment',
method: 'get',
params: data
});
}
//查找学生
export function GetStudentByKeyWord(data) {
return request({ return request({
url: '/daily_behavior/api/Permission/GetStudentByKeyWord', url: '/api/UserRole/UserRoleDel',
method: 'get', method: 'get',
params: data params: data
}); });
} }
//添加学生干部
export function AddStudent(data) {
return request({
url: '/daily_behavior/api/Permission/AddStudent',
method: 'post',
data: data
});
}
/*----------------------------------------------------模板设置-------------------------------*/
// 获取模板列表
export const getTemplateList = (params) => {
return request.get('/daily_behavior/api/Config/ExportTemplate/List', params)
}
// 导出模板管理-上传
export const UploadTemplate = (params) => {
return request.post('/daily_behavior/api/Config/ExportTemplate/Upload', params)
}
// 导出模板管理-修改
export const UpdateTemplate = (params) => {
return request.post('/daily_behavior/api/Config/ExportTemplate/Update', params)
}
// 模板预览
export const PreviewTemplate = (params, withData) => {
return request.get(`/daily_behavior/api/Config/ExportTemplate/Preview?withData=${withData}`, params)
}
// 模板填充的关键字
export const getField = (params) => {
return request.get(`/daily_behavior/api/Config/ExportTemplate/Field`, params)
}
/*-----------------------------------------人员选择器--------------------------------------------*/ //
// 人员选择器配置-查询列表
export const getPeopleSelectList = (params) => {
return request.get('/daily_behavior/api/Config/PeopleSelector/List', params)
}
// 人员选择器配置-修改
export const UpdateSelectList = (params) => {
return request.post('/daily_behavior/api/Config/PeopleSelector/Update', params)
}
//人员选择器配置-数据预览
export const PreviewSelectList = (params) => {
return request.get('/daily_behavior/api/Config/PeopleSelector/Preview', params)
}
/*-----------------------------------------其他设置--------------------------------------------*/ //
// 默认公开配置-查询
export const getDefaultPublic = (params) => {
return request.get('/daily_behavior/api/Config/DefaultPublic', params)
}
// 默认公开配置-修改
export const UpdateDefaultPublic = (params) => {
return request.post(`/daily_behavior/api/Config/DefaultPublic/Update?status=${params.status}`)
}
// 消息提醒配置-查询
export const getMessageList = (params) => {
return request.get('/daily_behavior/api/Config/MessageRemindConfig/List', params)
}
// 消息提醒配置-修改
export const UpdateMessage = (params) => {
return request.post('/daily_behavior/api/Config/MessageRemindConfig/Update', params)
}
// 角色允许操作-查询
export const getRoleList = (params) => {
return request.get('/daily_behavior/api/Config/RoleActionConfig/List', params)
}
// 角色允许操作-修改
export const UpdateRole = (params) => {
return request.post('/daily_behavior/api/Config/RoleActionConfig/Update', params)
}
// 按钮配置-查询列表
export const getBtnList = (params) => {
return request.get('/daily_behavior/api/Config/ButtonConfig/List', params)
}
// 按钮配置-修改
export const UpdateBtn = (params) => {
return request.post('/daily_behavior/api/Config/ButtonConfig/Update', params)
}
// 反馈中心栏目分类-列表
export const getClassifyList = (params) => {
return request.get('/daily_behavior/api/Config/HomePageItem/List', params)
}
// 反馈中心栏目分类-列表
export const UpdateClassifyList = (params) => {
return request.post('/daily_behavior/api/Config/HomePageItem/Update', params)
}
/*-----------------------------------------------后端版本号获取--------------------------*/
// API版本号
export const getAPIVersion = (params) => {
return request.get('/daily_behavior/api/Config/APIVersion', params)
}
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</keep-alive> </keep-alive>
</div> </div>
</Content> </Content>
<i-copyright /> <!-- <i-copyright /> -->
</Layout> </Layout>
<div v-if="isMobile && !hideSider"> <div v-if="isMobile && !hideSider">
<Drawer v-model="showDrawer" placement="left" :closable="false" :class-name="drawerClasses"> <Drawer v-model="showDrawer" placement="left" :closable="false" :class-name="drawerClasses">
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
</Tooltip> </Tooltip>
<i-menu-side-collapse v-else :menu="item" :key="index" top-level /> <i-menu-side-collapse v-else :menu="item" :key="index" top-level />
</template> </template>
<div class="footer">Build 1.0.0 - 240701 1.0.0</div>
</Menu> </Menu>
</div> </div>
</template> </template>
...@@ -107,3 +108,16 @@ ...@@ -107,3 +108,16 @@
} }
} }
</script> </script>
<style scoped>
.footer {
text-align: center;
color: #999;
font-size: 12px;
padding: 8px 0;
width: 100%;
height: 40px;
position: absolute;
bottom: 0;
}
</style>
...@@ -8,12 +8,12 @@ export default { ...@@ -8,12 +8,12 @@ export default {
auth: ['user'], auth: ['user'],
children: [ children: [
{ {
path: `${pre}common`, path: `${pre}role`,
title: '通用' title: '角色设置'
}, },
{ {
path: `${pre}permission`, path: `${pre}permission`,
title: '权限' title: '人员权限设置'
} },
] ]
} }
...@@ -12,6 +12,13 @@ export default [ ...@@ -12,6 +12,13 @@ export default [
icon: 'md-clipboard', icon: 'md-clipboard',
auth: ['user'], auth: ['user'],
}, },
// set, {
path: '/logList',
title: '日志列表',
header: 'home',
icon: 'md-locate',
auth: ['user'],
},
set,
]; ];
\ No newline at end of file
<template>
<div>
<Card :bordered="false" dis-hover class="ivu-mb">
<div>
<DatePicker type="daterange" v-model="date" placement="bottom-end" placeholder="请选择日期范围" class="ivu-mr-8" style="width: 200px"
@on-change='dateChange'></DatePicker>
<Input v-model="searchValue" placeholder="请输入关键字..." style="width: 200px;" @keyup.enter.native="getData" clearable />
<Button class="ivu-ml-8" type="primary" @click="doSearch">查找</Button>
</div>
<Table ref="table" border class="ivu-mt" :columns="columns" :data="tableData" :height='tableHeight' :loading="loading" stripe size='small'>
<template slot-scope="{ row }" slot="action">
<div @click.stop.prevent>
<a type="text" @click.stop="handleCheck(row)">查看详情</a>
</div>
</template>
</Table>
<div class="ivu-mt ivu-text-center">
<Page :transfer="true" :total="total" show-total show-elevator show-sizer class-name="pagenation" :current="pageIndex" :page-size="pageSize"
:page-size-opts="[20, 50, 100, 1000]" @on-change="handleCurrentChange" @on-page-size-change="handleSizeChange" />
</div>
</Card>
</div>
</template>
<script>
import { GetOperationLogList } from '@/api/logList'
export default {
data() {
return {
searchValue: '',
begin_time: '',
end_time: '',
date: '',
pageIndex: 1,
pageSize: 20,
loading: false,
tableData: [],
columns: [
{
title: 'ip',
key: 'ip',
},
{
title: '接口',
key: 'type',
},
{
title: 'api',
key: 'api',
},
{
title: '请求方式',
key: 'method',
},
{
title: '请求数据',
key: 'request',
tooltip: true,
},
{
title: '返回结束',
key: 'response',
tooltip: true,
},
{
title: '操作人',
key: 'user_name',
},
{
title: '状态码',
key: 'code',
},
{
title: '报错信息',
key: 'error msg',
},
{
title: '请求时间',
key: 'createtime',
},
{
title: '执行时间',
key: 'spend time',
},
],
total: 0,
}
},
computed: {
tableHeight() {
return document.body.clientHeight - 270;
},
},
mounted() {
this.getData()
},
methods: {
getData() {
const params = {
"key_name": this.searchValue,
"begin_time": this.begin_time,
"end_time": this.end_time,
"page_index": this.pageIndex,
"page_size": this.pageSize
}
GetOperationLogList(params).then(resp => {
console.log(resp)
this.tableData = resp.data;
this.total = resp.data_count
})
},
// 监听页码发生改变
handleCurrentChange(page) {
this.pageIndex = page;
this.getData();
},
// 监听pageSize发生改变,即每页几条数据
handleSizeChange(newSize) {
this.pageSize = newSize;
this.getData();
},
dateChange(val) {
this.begin_time = val[0];
this.end_time = val[1];
},
doSearch() {
this.pageIndex = 1;
this.getData()
}
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template> <template>
<div> <div>
<Card :bordered="false" dis-hover class="ivu-mt" ref="card"> <Card :bordered="false" dis-hover class="ivu-mt" ref="card">
<Button type="primary" ghost icon="md-add" @click="modal = true"> <div class="top-condition">
<Input v-model="searchValue" placeholder="请输入关键字" style="width: 250px; margin-bottom: 5px" @keyup.enter.native="doSearch" clearable />
<Button type="primary" style="margin: 0 10px" @click="doSearch">查找</Button>
<Button type="primary" ghost icon="md-add" @click="userModal = true">
添加权限 添加权限
</Button> </Button>
<ButtonGroup class="ivu-ml-8" style="display: inline-flex;">
<Upload :before-upload="handleUpload" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
action="/" style="display: inline-flex" :show-upload-list='false'>
<Button type="primary" :loading="uploadLoading" style="border-radius: 4px 0 0 4px">
数据导入
</Button>
</Upload>
<Tooltip content="模板下载" transfer>
<Button icon="md-download" type="primary" ghost @click="handleDownTem" :loading="downloadLoading"
style="border-radius: 0 4px 4px 0"></Button>
</Tooltip>
</ButtonGroup>
<div class="ivu-inline-block ivu-fr">
<RadioGroup v-model="roleType" type="button" @on-change="handleChangeRadio">
<Radio label="">全部</Radio>
<Radio :label="0">管理员</Radio>
<Radio :label="5">教学部负责人</Radio>
<Radio :label="6">班干部</Radio>
<!-- <Radio :label="1">教师督导</Radio>
<Radio :label="2">主管领导</Radio> -->
</RadioGroup>
</div> </div>
<Table ref="table" :columns="columns" :data="list" :loading="loading" class="ivu-mt"> <Table ref="table" :columns="columns" :data="tableData" :loading="loading" class="ivu-mt">
<template slot-scope="{ row }" slot="role"> <template slot-scope="{ row }" slot="role_info">
<p v-for="(item, i) in row.role" :key="i">
<p v-for="(item, i) in row.role_info" :key="i">
<Badge :color=" <Badge :color="
item.roleType == 1 item.name == '管理员'
? 'orange' ? 'orange'
: item.roleType == 2
? 'green'
: 'blue' : 'blue'
" :text="item.roleTypeLabel" /> " :text="item.name" class="ivu-mb-8" />
{{ item.feedback_type.length > 0 ? " 负责:" : "" }}
<span v-for="(o, i2) in item.feedback_type" :key="i2">
{{ o + (item.feedback_type.length - 1 === i2 ? "" : "、") }}
</span>
</p> </p>
</template> </template>
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<div @click.stop.prevent> <div @click.stop.prevent>
<a type="text" @click="handleDel(row.user_id)">删除</a> <a type="text" @click="handleEdit(row)">编辑</a>
<Divider type="vertical"></Divider>
<a type="text" @click="handleDelete(row.id)">删除</a>
</div> </div>
</template> </template>
</Table> </Table>
<div class="ivu-mt ivu-text-center"> <div class="ivu-mt ivu-text-center">
<Page :total="total" :current.sync="current" show-total show-sizer show-elevator :page-size="limit" @on-change="handleChangePage" <Page :total="total" :current.sync="pageIndex" show-total show-sizer show-elevator :page-size="pageSize" :page-size-opts="[10, 30, 50, 100]"
@on-page-size-change="handleChangePageSize" /> @on-change="handleChangePage" @on-page-size-change="handleChangePageSize" />
</div> </div>
</Card> </Card>
<Modal v-model="modal" title="添加权限" @on-ok="handleAdd" :loading="modalLoading"> <Modal v-model="modal" title="编辑权限" @on-ok="saveEdit" @on-cancel="handleCancel" :loading="modalLoading" width="30%">
<Tabs v-model="activeTab"> <CheckboxGroup v-model="userRole">
<TabPane label="教师" name="teacher"></TabPane> <Checkbox :label="item.id" border v-for="item in allRole" :key="item.id">{{ item.name }}</Checkbox>
<TabPane label="学生" name="student"></TabPane>
</Tabs>
<h3>选择人员</h3>
<Select v-model="teacher" filterable placeholder="输入姓名或部门搜索" style="padding: 15px 0" v-if="activeTab == 'teacher' ">
<Option v-for="(item,index) in teacherList" :key="index" :value="item.card_number + '`' + item.name" :label="item.name">
<span>{{ item.name }}</span>
<span style="float: right; color: #ccc">{{ item.dept_name }}</span>
</Option>
</Select>
<!-- <Select v-model="teacher" filterable placeholder="输入姓名或部门搜索" style="padding: 15px 0" v-if="activeTab == 'student' ">
<Option v-for="(item,index) in studentList" :key="index" :value="item.card_number + '`' + item.name" :label="item.name">
<span>{{ item.name }}</span>
<span style="float: right; color: #ccc">{{ item.class_name }}</span>
</Option>
</Select> -->
<Select v-model="student" :remote-method="remoteMethod" :loading="loading1" filterable clearable style="padding: 15px 0"
v-if="activeTab == 'student' " placeholder="输入姓名或部门搜索">
<Option v-for="item in studentList" :value="item.card_number + '`' + item.name" :label="item.name" :key="item.card_number">
<span>{{ item.name }}</span>
<span style="float: right; color: #ccc">{{ item.class_name }}</span>
</Option>
</Select>
<h3 v-if="activeTab == 'teacher' ">选择权限</h3>
<CheckboxGroup v-model="role" @on-change="handleChangeCheckbox" style="display: flex; flex-direction: column" v-if="activeTab == 'teacher' ">
<div style="padding: 15px 0">
<Checkbox label="admin" border>管理员</Checkbox>
</div>
<div style="padding: 15px 0">
<Checkbox label="supervisor" border>教学负责人</Checkbox>
<Select v-model="supervisorRole" multiple :disabled="supervisorDisabled" style="width: 355px">
<Option v-for="c in deptList" :value="c.id" :key="c.id">
{{ c.label }}
</Option>
</Select>
</div>
<!-- <div style="padding: 15px 0">
<Checkbox label="leader" border>主管领导</Checkbox>
<Select v-model="leaderRole" multiple :disabled="leaderDisabled" style="width: 370px">
<Option v-for="d in deptList" :value="d.id" :key="d.id">
{{ d.label }}
</Option>
</Select>
</div> -->
</CheckboxGroup> </CheckboxGroup>
</Modal> </Modal>
<Modal v-model="uploadErrModal" width="360">
<p slot="header" style="color: #f60; text-align: center"> <Modal v-model="userModal" title="添加权限" @on-ok="handleAdd" :loading="modalLoading" width='50'>
<Icon type="ios-information-circle"></Icon> <Form ref="form" :model="formData" :rules="formRule" :label-width="150">
<span>导入失败</span> <FormItem label="选择人员">
<Select v-model="selectUser" filterable>
<Option v-for="item in peopleOption" :value="item.id" :key="item.id" :label="item.name">
<div style="display:flex;justify-content: space-between;">
<p>{{ item.name }}
<span style="color:#9a9a9a">({{item.card}})</span>
</p> </p>
<div style="text-align: center"> <p style="color:#ccc">{{ item.dept_name }}</p>
<h2>
导入信息有误
</h2>
</div>
<div slot="footer">
<Button type="error" size="large" long @click="downloadErr">下载错误数据</Button>
</div> </div>
</Option>
</Select>
</FormItem>
<FormItem label="选择权限">
<CheckboxGroup v-model="userRole">
<Checkbox :label="item.id" border v-for="item in allRole" :key="item.id">{{ item.name }}</Checkbox>
</CheckboxGroup>
</FormItem>
</Form>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import { PermissionList, PermissionDelete, PermissionRoleType, OptionList, PermissionAdd, DownStudentCadreImportModel, CreateStudentCadreByExcel, GetDepartment, GetStudentByKeyWord, AddStudent } from "@/api/set"; import * as api from "@/api/set";
import { TeacherByKeyWord } from "@/api/common"; import { GetPersonByCondiction } from "@/api/arrangement"
export default { export default {
data() { data() {
return { return {
roleType: '', loading: false,
columns: [{ modal: false,
type: 'index', modalLoading: true,
searchValue: "",
tableData: [],
columns: [
{
type: "index",
align: "center",
width: 60, width: 60,
align: 'center'
}, },
{ {
title: '卡号', title: "卡号",
key: 'user_id', key: "card",
width: 150 width: 200
}, },
{ {
title: '姓名', title: "姓名",
key: 'user_name', key: "name",
width: 150 width: 200
}, },
{ {
title: '权限', title: "角色",
slot: 'role', slot: "role_info",
minWidth: 200,
}, },
{ {
title: '管理范围', title: "操作",
key: 'departments', slot: "action",
minWidth: 200, align: "center",
width: 150
}, },
{
title: '操作',
slot: 'action',
width: 150,
align: 'center'
}
], ],
loading: false, pageIndex: 1,
list: [], pageSize: 10,
current: 1,
limit: 10,
total: 0, total: 0,
modal: false, allRole: [],
modalLoading: true, userRole: [], // 用户所拥有的角色
teacherList: [], cardNumber: "",
teacher: undefined, editRow: {},
role: [], userModal: false,
feedbackTypeList: [], formData: {},
supervisorDisabled: true, formRule: {},
supervisorRole: [], peopleOption: [],
leaderDisabled: true, selectUser: ''
leaderRole: [], };
downloadLoading: false,
uploadErrModal: false,
err_path: '',
uploadLoading: false,
deptList: [],
studentList: [],
student:undefined,
activeTab: 'teacher',
loading1: false
}
}, },
created() { created() {
TeacherByKeyWord().then(res => { this.getData();
this.teacherList = res this.getRoleList();
}) this.GetPersonByCondiction();
OptionList({ user_flag: 1 }).then(res => {
this.feedbackTypeList = res
})
GetDepartment().then(res => {
this.deptList = res
})
this.getData()
}, },
methods: { methods: {
getData() { getData() {
if (this.loading) return; const params = {
page_index: this.pageIndex,
page_size: this.pageSize,
key_name: this.searchValue,
};
this.loading = true; this.loading = true;
api.GetUserRoleList(params).then((resp) => {
PermissionList({
keyWord: '',
roleType: this.roleType,
pageIndex: this.current,
pageSize: this.limit
}).then(res => {
// console.log(res)
this.list = res.data;
this.current = res.pageIndex;
this.total = res.dataCount;
this.loading = false; this.loading = false;
this.tableData = resp.data;
this.total = resp.data_count;
});
},
// 获取所有角色
getRoleList() {
api.GetRoleSelect().then((resp) => {
this.allRole = resp;
}); });
}, },
handleChangeRadio(val) {
// 点击查询
doSearch() {
this.pageIndex = 1;
this.getData() this.getData()
}, },
// 切换页码 // 切换页码
handleChangePage(page) { handleChangePage(page) {
this.current = page; this.pageIndex = page;
this.getData(); this.getData();
}, },
// 切换每页条数 // 切换每页条数
handleChangePageSize(size) { handleChangePageSize(size) {
this.current = 1; this.pageIndex = 1;
this.limit = size; this.pageSize = size;
this.getData(); this.getData();
}, },
handleDel(id) { // 编辑权限
this.$Modal.confirm({ handleEdit(row) {
title: '确定要删除吗?', this.editRow = row;
onOk: () => { this.modal = true;
PermissionDelete({ user_id: id }).then(() => { if (row.role_info.length) {
this.$Message.success('删除成功'); this.userRole = row.role_id.split(';')
this.getData();
})
} }
});
}, },
handleChangeCheckbox(e) { // 编辑保存
this.supervisorDisabled = e.findIndex(x => x === 'supervisor') === -1 saveEdit() {
this.leaderDisabled = e.findIndex(x => x === 'leader') === -1 let arr = [];
}, this.userRole.map(x => {
handleAdd() { arr.push(this.allRole.find(c => c.id == x))
// 给教师添加权限
if (this.activeTab == 'teacher') {
if (!this.teacher || this.role.length === 0) {
this.handleModalLoading()
this.$Message.warning("请选择");
} else {
let roleArr = []
for (let i = 0; i < this.role.length; i++) {
const key = this.role[i];
switch (key) {
case 'admin':
roleArr.push({ role_type: 0, departments: [] })
break;
case 'supervisor':
if (this.supervisorRole.length === 0) {
this.handleModalLoading()
this.$Message.warning("请选择教师督导负责的反馈类型");
return
} else {
roleArr.push({ role_type: 5, departments: this.supervisorRole })
}
break;
// case 'leader':
// if (this.leaderRole.length === 0) {
// this.handleModalLoading();
// this.$Message.warning("请选择主管领导负责的反馈类型");
// return
// } else {
// roleArr.push({ role_type: 2, feedback_type: this.leaderRole })
// }
// break;
}
}
const data = {
user_id: this.teacher.split('`')[0],
user_name: this.teacher.split('`')[1],
role: roleArr
}
PermissionAdd(data).then(() => {
this.teacher = undefined
this.supervisorDisabled = this.leaderDisabled = true
this.role = this.supervisorRole = this.leaderRole = []
this.getData()
this.modal = false;
this.$Message.success("添加成功");
}) })
} const params = {
}else{ // 给学生添加权限 ...this.editRow,
if (!this.student) { role_id: this.userRole.join(','),
this.handleModalLoading() role_info: arr
this.$Message.warning("请选择"); };
}else{ api.UserRoleSave(params).then((resp) => {
const data = { this.handleModalLoading();
user_id: this.student.split('`')[0],
user_name: this.student.split('`')[1],
}
AddStudent(data).then(() => {
this.student = undefined
this.getData()
this.modal = false; this.modal = false;
this.$Message.success("添加成功"); this.$Message.success("添加成功");
}) this.userRole = [];
} this.getData();
}).catch(() => {
this.handleModalLoading();
});
},
handleCancel() {
this.userRole = [];
},
// 获取人员选择器数据
GetPersonByCondiction() {
const params = {
page_index: 1,
page_size: 10000
} }
GetPersonByCondiction(params).then(resp => {
this.peopleOption = resp.data;
})
},
// 确认添加权限
handleAdd() {
let arr = [];
this.userRole.map(x => {
arr.push(this.allRole.find(c => c.id == x))
})
const params = {
userid: this.selectUser,
role_id: this.userRole.join(','),
role_info: arr
};
api.UserRoleSave(params).then((resp) => {
this.handleModalLoading();
this.userModal = false;
this.$Message.success("添加成功");
this.getData();
}).catch(() => {
this.handleModalLoading();
});
}, },
handleModalLoading() { handleModalLoading() {
this.modalLoading = false; this.modalLoading = false;
this.$nextTick(() => { this.$nextTick(() => {
...@@ -318,56 +239,33 @@ export default { ...@@ -318,56 +239,33 @@ export default {
}); });
}, },
// 模板下载 // 删除人员权限
handleDownTem() { handleDelete(id) {
this.downloadLoading = true this.$Modal.confirm({
title: "确定要删除吗?",
DownStudentCadreImportModel().then(resp => { loading: true,
this.downloadLoading = false onOk: () => {
window.location.href = resp const params = {
}).catch(err => { id,
this.downloadLoading = false is_del: 1
})
},
// 导入
handleUpload(file) {
this.uploadLoading = true
let fileData = new FormData()
fileData.append('file', file)
CreateStudentCadreByExcel(fileData).then(res => {
this.uploadLoading = false
if (res.import_status) {
this.$Message.success('导入成功')
} else {
this.err_path = res.err_path;
this.uploadErrModal = true
this.$Message.erroe('导入失败')
} }
this.getData() api.UserRoleDel(params).then(() => {
}).catch(err => { this.$Modal.remove();
this.uploadLoading = false this.$Message.success("删除成功");
}) this.getData();
return false; });
}, },
// 下载错误信息 });
downloadErr() {
window.location.href = this.err_path;
}, },
// 远程搜索学生
remoteMethod(query) {
if (query !== '') {
this.loading1 = true;
// 获取人员列表
GetStudentByKeyWord({ keyWord: query }).then(resp => {
this.loading1 = false;
this.studentList = resp
})
} else {
this.studentList = [];
}
}, },
} };
}
</script> </script>
<style scoped lang='less'>
.top-condition {
display: flex;
}
/deep/.ivu-checkbox-group-item {
margin-bottom: 10px;
}
</style>
\ No newline at end of file
<template>
<div>
<Card :bordered="false" dis-hover class="ivu-mt" ref="card">
<Button type="primary" ghost icon="md-add" @click="modal = true">
添加角色
</Button>
<Table ref="table" :columns="columns" :data="tableData" :loading="loading" class="ivu-mt">
<template slot-scope="{ row }" slot="action">
<div @click.stop.prevent>
<a type="text" @click="handleEdit(row)">编辑</a>
<Divider type="vertical"></Divider>
<a type="text" @click="handleMenu(row)">菜单权限</a>
<Divider type="vertical"></Divider>
<a type="text" @click="handleDelete(row.id)">删除</a>
</div>
</template>
</Table>
</Card>
<Modal v-model="modal" title="添加角色" @on-ok="handleAdd" :loading="modalLoading">
<h3 style="margin-bottom: 5px">角色名称</h3>
<Input v-model="roleName" placeholder="请输入角色名称" />
</Modal>
<Modal v-model="editModal" title="编辑角色" @on-ok="saveEdit" :loading="modalLoading">
<h3 style="margin-bottom: 5px">角色名称</h3>
<Input v-model="editName" placeholder="请输入角色名称" />
</Modal>
<Modal v-model="menuModal" title="分配菜单" @on-ok="saveMenu" :loading="modalLoading">
<CheckboxGroup v-model="userMenu">
<Checkbox :label="item.id" border v-for="item in menuData" :key="item.id">{{ item.name }}</Checkbox>
</CheckboxGroup>
</Modal>
</div>
</template>
<script>
import * as api from "@/api/set";
export default {
data() {
return {
modal: false,
editModal: false,
modalLoading: true,
searchValue: "",
loading: false,
roleName: "",
editName: "",
tableData: [],
roleId: "",
columns: [
{
type: "index",
title: "序号",
align: "center",
width: 150
},
{
title: "名称",
key: "role_name",
},
{
title: "操作",
slot: "action",
align: "center",
fixed: "right",
},
],
menuModal: false,
menuData: [],
userMenu: [],
editRow: {}
};
},
created() {
this.getData();
this.getMenuData();
},
methods: {
// 获取角色列表
getData() {
const params = {
page_index: 1,
page_size: 100,
key: this.searchValue,
};
this.loading = true;
api.GetRoleList(params).then((resp) => {
this.loading = false;
this.tableData = resp.data;
});
},
// 获取所有菜单列表
getMenuData() {
api.GetCapacitySelect().then(resp => {
this.menuData = resp;
})
},
// 添加角色
handleAdd() {
if (this.roleName == "") {
this.handleModalLoading();
this.$Message.warning("请输入角色名称");
} else {
const params = {
role_name: this.roleName,
capacity_info: []
};
api.RoleSave(params).then((resp) => {
this.modal = false;
this.$Message.success("添加成功");
this.roleName = "";
this.getData();
}).catch(() => {
this.handleModalLoading();
});
}
},
// 编辑角色
handleEdit(row) {
this.editName = row.role_name;
this.roleId = row.id;
this.editRow = row;
this.editModal = true;
},
saveEdit() {
if (this.editName == "") {
this.handleModalLoading();
this.$Message.warning("请输入角色名称");
} else {
const params = {
...this.editRow,
role_name: this.editName,
id: this.roleId,
};
api.RoleSave(params).then((resp) => {
this.editModal = false;
this.$Message.success("编辑成功");
this.editName = "";
this.getData();
}).catch(() => {
this.handleModalLoading();
});
}
},
// 删除角色
handleDelete(id) {
this.$Modal.confirm({
title: "确定要删除当前角色吗?",
loading: true,
onOk: () => {
const params = {
id,
is_del: 1
}
api.RoleDel(params).then(() => {
this.$Modal.remove();
this.$Message.success("删除成功");
this.getData();
});
},
});
},
// 编辑菜单分配
handleMenu(row) {
this.editName = row.role_name;
this.roleId = row.id;
this.editRow = row;
this.menuModal = true
this.userMenu = row.capacity_info.map(x => { return x.id })
},
// 保存菜单分配
saveMenu() {
let arr = [];
this.userMenu.map(x => {
arr.push(this.menuData.find(c => c.id == x))
})
const params = {
...this.editRow,
role_name: this.editName,
id: this.roleId,
capacity_id: this.userMenu.join(','),
capacity_info: arr
};
api
.RoleSave(params)
.then((resp) => {
this.menuModal = false;
this.$Message.success("分配成功");
this.getData();
})
.catch((err) => {
this.handleModalLoading();
});
},
handleModalLoading() {
this.modalLoading = false;
this.$nextTick(() => {
this.modalLoading = true;
});
},
},
};
</script>
<style scoped lang='less'>
/deep/.ivu-checkbox-group-item {
margin-bottom: 8px;
}
</style>
\ No newline at end of file
...@@ -32,6 +32,25 @@ export default { ...@@ -32,6 +32,25 @@ export default {
title: '权限设置' title: '权限设置'
}, },
component: () => import('@/pages/set/permission') component: () => import('@/pages/set/permission')
} },
{
path: 'role',
name: `${pre}role`,
meta: {
...meta,
title: '角色设置'
},
component: () => import('../../pages/set/role')
},
{
path: 'permission',
name: `${pre}permission`,
meta: {
...meta,
title: '人员权限设置'
},
component: () => import('../../pages/set/permission')
},
] ]
}; };
...@@ -23,14 +23,23 @@ const frameIn = [{ ...@@ -23,14 +23,23 @@ const frameIn = [{
component: () => import('@/pages/arrangement/index.vue') component: () => import('@/pages/arrangement/index.vue')
}, },
{ {
path: 'log', path: 'logList',
name: 'log', name: 'logList',
meta: { meta: {
title: '前端日志', title: '日志列表',
auth: ['user'] auth: ['user']
}, },
component: () => import('@/pages/system/log') component: () => import('@/pages/logList/index.vue')
}, },
// {
// path: 'log',
// name: 'log',
// meta: {
// title: '前端日志',
// auth: ['user']
// },
// component: () => import('@/pages/system/log')
// },
// 刷新页面 必须保留 // 刷新页面 必须保留
{ {
path: 'refresh', path: 'refresh',
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或