提交 92738bfd 编写于 作者: 符英鹏's avatar 符英鹏 🏀

feat:'值班管理'

上级 30fd39ef
.page-sys-role-drawer-footer,.page-sys-role-drawer-footer[data-v-cb4874c2]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.formwork-name[data-v-cb4874c2]{color:#333;font-weight:700}.formwork-name[data-v-cb4874c2]:hover{color:#2d8cf0}.page-sys-role-drawer-footer[data-v-cdbc14d4]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.preview-footer[data-v-cdbc14d4]{display:flex;justify-content:space-between;align-items:center}table[data-v-c583bb18]{width:100%;height:400px;border-left:1px solid #666;border-bottom:1px double #666}tbody tr[data-v-c583bb18]{text-align:center}td[data-v-c583bb18],th[data-v-c583bb18]{border-right:1px solid #666;border-top:1px solid #666}td[data-v-c583bb18]{text-align:center}.save-btn[data-v-c583bb18]{text-align:center;margin-top:20px}.tips[data-v-7a2c3104]{color:#999;font-size:12px;margin-top:22px}#lineTd[data-v-09e03553]{background:#fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxsaW5lIHgyPSIxMDAlIiB5Mj0iMTAwJSIgc3Ryb2tlPSIjMDAwIi8+PC9zdmc+) no-repeat 100%;width:200px;height:100px}table[data-v-09e03553]{width:100%;height:400px;border-left:1px solid #666;border-bottom:1px double #666}tbody tr[data-v-09e03553]{text-align:center}td[data-v-09e03553],th[data-v-09e03553]{border-right:1px solid #666;border-top:1px solid #666}td[data-v-09e03553]{text-align:center}.ivu-checkbox-group[data-v-09e03553]{display:flex;flex-direction:column;align-items:flex-start;font-size:16px!important;padding:20px}.ivu-checkbox-wrapper[data-v-09e03553]{font-size:16px}.save-btn[data-v-09e03553]{text-align:center;margin-top:20px}
\ No newline at end of file
.container[data-v-357d0c41]{text-align:center}.container .img-bg[data-v-357d0c41]{width:300px;text-align:center}
\ No newline at end of file
.ivu-form-item[data-v-463eb2cd]{padding-right:15px}.fileRow[data-v-463eb2cd]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-463eb2cd]{color:#ed4014}.fileRow .delIcon[data-v-463eb2cd]:hover{color:#f16643;cursor:pointer}.demo-split[data-v-91bc0448]{height:calc(100vh - 112px)}.demo-split .demo-split-pane-L[data-v-91bc0448]{padding:10px;height:100%;background-color:#fff}.demo-split .demo-split-pane-R[data-v-91bc0448]{padding-left:8px}
\ No newline at end of file
.index[data-v-50c67b16]{width:100%;box-sizing:border-box;padding:10px;background-color:#fff}table[data-v-50c67b16]{width:100%;background-color:#fff;border-color:#e3e8ee;text-align:center;border-radius:4px;border-top:1px solid #e3e8ee;border-left:1px solid #e3e8ee}tr[data-v-50c67b16]{border:none;text-align:center}td[data-v-50c67b16]{border-bottom:1px solid #e3e8ee;border-right:1px solid #e3e8ee;text-align:center;box-sizing:border-box;padding:6px;cursor:pointer;max-width:150px}td[data-v-50c67b16]:hover{background:#e7f7f4}td:hover .dis[data-v-50c67b16]{display:block;text-align:center;margin:0 auto;cursor:pointer}tr[data-v-50c67b16]:first-child{height:30px;background-color:#f3f3f3;border:none;color:#525252;font-weight:700;width:50px}.sepacialy[data-v-50c67b16]{border-top:1px solid #e3e8ee;border-left:1px solid #e3e8ee}.table-heard[data-v-50c67b16]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;box-sizing:border-box;padding:10px 10px}.table-heard .center[data-v-50c67b16]{display:flex;justify-content:center;align-items:center}.table-heard .center p[data-v-50c67b16]{font-size:20px;margin:0 30px}.course-item[data-v-50c67b16]{display:flex;justify-content:center;flex-direction:column;gap:6px;align-items:center;min-height:80px;border-radius:4px;box-sizing:border-box;padding:10px 0}.course-item p[data-v-50c67b16]{color:#3a3a3a}.time[data-v-50c67b16]{background:#f7f7f7;color:#707070;font-weight:700}
\ No newline at end of file
.index[data-v-34c35b82]{width:100%;box-sizing:border-box;padding:10px;background-color:#fff}table[data-v-34c35b82]{width:100%;background-color:#fff;border-color:#e3e8ee;text-align:center;border-radius:4px;border-top:1px solid #e3e8ee;border-left:1px solid #e3e8ee}tr[data-v-34c35b82]{border:none;text-align:center}td[data-v-34c35b82]{border-bottom:1px solid #e3e8ee;border-right:1px solid #e3e8ee;text-align:center;box-sizing:border-box;padding:6px;cursor:pointer;max-width:150px}td[data-v-34c35b82]:hover{background:#e7f7f4}td:hover .dis[data-v-34c35b82]{display:block;text-align:center;margin:0 auto;cursor:pointer}tr[data-v-34c35b82]:first-child{height:30px;background-color:#f3f3f3;border:none;color:#525252;font-weight:700;width:50px}.sepacialy[data-v-34c35b82]{border-top:1px solid #e3e8ee;border-left:1px solid #e3e8ee}.table-heard[data-v-34c35b82]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;box-sizing:border-box;padding:10px 10px}.table-heard .center[data-v-34c35b82]{display:flex;justify-content:center;align-items:center}.table-heard .center p[data-v-34c35b82]{font-size:20px;margin:0 30px}.course-item[data-v-34c35b82]{display:flex;justify-content:center;flex-direction:column;gap:6px;align-items:center;min-height:80px;border-radius:4px;box-sizing:border-box;padding:10px 0}.course-item p[data-v-34c35b82]{color:#3a3a3a}.time[data-v-34c35b82]{background:#f7f7f7;color:#707070;font-weight:700}
\ No newline at end of file
.container[data-v-7a1ebc9a]{text-align:center}.container .img-bg[data-v-7a1ebc9a]{width:300px;text-align:center}
\ 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.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.a9ed129c.js></script></body></html>
\ 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.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.587c01ba.js></script></body></html>
\ No newline at end of file
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2290374e"],{8354:function(t,n,s){t.exports=s.p+"img/功能调整中.44ca9bae.png"},"9d03":function(t,n,s){"use strict";s.r(n);var e=function(){var t=this;t._self._c;return t._m(0)},i=[function(){var t=this,n=t._self._c;return n("div",{staticClass:"container"},[n("img",{staticClass:"img-bg",attrs:{src:s("8354")}}),n("strong",{staticStyle:{"font-size":"20px",display:"block","margin-top":"16px"}},[t._v("功能调整中")])])}],c={data:function(){return{}}},a=c,r=(s("e44f"),s("2877")),o=Object(r["a"])(a,e,i,!1,null,"357d0c41",null);n["default"]=o.exports},e44f:function(t,n,s){"use strict";s("ee7f")},ee7f:function(t,n,s){}}]);
\ 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-2d0dd7f1"],{8245: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){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,"04f6853d",null);t["default"]=d.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-599ee512"],{"08cf":function(t,e,a){},"5d27":function(t,e,a){"use strict";a("08cf")},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("div",[e("Tag",{attrs:{size:"large"}},[t._v(t._s(this.currentWeekRange[0]+"至"+this.currentWeekRange[1]))]),e("Button",{attrs:{type:"primary"}},[t._v("值班导入")])],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")]),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("\n 白天:"+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("\n 晚上:"+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("5d27"),a("2877")),d=Object(c["a"])(s,n,i,!1,null,"34c35b82",null);e["default"]=d.exports},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
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-74bc4386"],{3883:function(t,n,s){},"49a5":function(t,n,s){"use strict";s.r(n);var c=function(){var t=this;t._self._c;return t._m(0)},i=[function(){var t=this,n=t._self._c;return n("div",{staticClass:"container"},[n("img",{staticClass:"img-bg",attrs:{src:s("8354")}}),n("strong",{staticStyle:{"font-size":"20px",display:"block","margin-top":"16px"}},[t._v("功能调整中")])])}],a={data:function(){return{}}},r=a,e=(s("67df"),s("2877")),o=Object(e["a"])(r,c,i,!1,null,"7a1ebc9a",null);n["default"]=o.exports},"67df":function(t,n,s){"use strict";s("3883")},8354:function(t,n,s){t.exports=s.p+"img/功能调整中.44ca9bae.png"}}]);
\ No newline at end of file
(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
import request from '@/plugins/request';
// 查看值班分类树
export function GetClassifyTree(data) {
return request({
url: '/api/DutyClassify/GetClassifyTree',
method: 'get',
params: data
});
}
// 查看值班分类列表
export function QueryDutyClassify(data) {
return request({
url: '/api/DutyClassify/QueryDutyClassify',
method: 'get',
params: data
});
}
// 查看值班分类详情
export function GetDutyDetail(data) {
return request({
url: '/api/DutyClassify/GetDutyDetail',
method: 'get',
params: data
});
}
// 启用禁用值班分类
export function ModifyDutyStatus(data) {
return request({
url: '/api/DutyClassify/ModifyDutyStatus',
method: 'get',
params: data
});
}
// 删除值班分类
export function DeleteDuty(data) {
return request({
url: '/api/DutyClassify/DeleteDuty',
method: 'get',
params: data
});
}
// 新增值班分类
export function AddDutyType(data) {
return request({
url: '/api/DutyClassify/AddDutyType',
method: 'post',
data: data
});
}
// 获取值班配置下拉框
export function GetDutyConfigSelect(data) {
return request({
url: '/api/Common/GetDutyConfigSelect',
method: 'get',
params: data
});
}
\ No newline at end of file
此差异已折叠。
......@@ -15,11 +15,7 @@ export default {
// this.getAPIVersion();
},
methods:{
getAPIVersion(){
api.getAPIVersion().then(resp => {
this.copyright = this.copyright+' & '+resp
})
}
}
}
</script>
......
......@@ -10,25 +10,14 @@
<span class="i-layout-header-user-name" v-if="!isMobile"
>{{ info.name }}
</span>
<!-- <br /> -->
<!-- <span class="i-layout-header-user-name">{{ (role) }}</span> -->
<!-- <span class="i-layout-header-user-name" v-if="!isMobile"></span> -->
<DropdownMenu slot="list">
<!-- <DropdownMenu slot="list">
<DropdownItem>
<Icon type="md-person" />
<span>{{ role}}</span>
</DropdownItem>
<!-- <i-link to="/setting/account">
<DropdownItem>
<Icon type="ios-settings-outline" />
<span>{{ $t('basicLayout.user.setting') }}</span>
</DropdownItem>
</i-link>
<DropdownItem divided name="logout">
<Icon type="ios-log-out" />
<span>{{ $t('basicLayout.user.logOut') }}</span>
</DropdownItem> -->
</DropdownMenu>
</DropdownMenu> -->
</Dropdown>
</span>
</template>
......
......@@ -5,15 +5,29 @@ export default {
title: '系统设置',
header: 'home',
icon: 'md-settings',
auth: ['user'],
auth: ['role','permission','logList','initset'],
children: [
{
path: `${pre}role`,
title: '角色设置'
title: '角色设置',
auth: ['role'],
},
{
path: `${pre}permission`,
title: '人员权限设置'
title: '人员权限设置',
auth: ['permission'],
},
{
path: `${pre}initset`,
title: '初始化设置',
auth: ['initset'],
},
{
path: `${pre}logList`,
title: '操作日志',
// header: 'home',
// icon: 'md-locate',
auth: ['logList'],
},
]
}
......@@ -10,15 +10,23 @@ export default [
title: '值班安排',
header: 'home',
icon: 'md-clipboard',
auth: ['user'],
auth: ['arrangement'],
},
{
path: '/logList',
title: '日志列表',
path: '/dutyType',
title: '值班分类',
header: 'home',
icon: 'md-locate',
auth: ['user'],
icon: 'md-apps',
auth: ['dutyType'],
},
{
path: '/dutychange',
title: '调班备案',
header: 'home',
icon: 'md-swap',
auth: ['dutychange'],
},
set,
];
\ No newline at end of file
......@@ -5,9 +5,13 @@
<Spin fix v-if="loading"></Spin>
<!-- 表标题 -->
<div class="table-heard">
<Tag size='large'>{{
<div>
<Tag size='large'>{{
this.currentWeekRange[0] + '至' + this.currentWeekRange[1]
}}</Tag>
<Button type="primary">值班导入</Button>
</div>
<div class="center">
<Button @click="weekPre" size="default">
<Icon type="ios-arrow-back" />上一周
......@@ -33,12 +37,14 @@
<!-- 第几周的所有课程 -->
<div v-for="(x, index2) in course[index1].dutydatas" :key="index2" @click="clickCell(x,course[index1].date)">
<!-- 这天的课程开始时间 <=> 时间轴的开始时间 -->
<div class="course-item" v-if="x.duty_type_name === timeGround[index]" >
<div class="course-item" v-if="x.duty_type_name === timeGround[index]">
<p>
<Tag color='blue' v-if="x.duty_daytime_people" style="height:auto" @click.native="clickCell(x,course[index1].date)">白天:{{ x.duty_daytime_people }}</Tag>
<Tag color='blue' v-if="x.duty_daytime_people" style="height:auto" @click.native="clickCell(x,course[index1].date)">
白天:{{ x.duty_daytime_people }}</Tag>
</p>
<p>
<Tag color='red' v-if="x.duty_night_people" style="height:auto" @click.native="clickCell(x,course[index1].date)">晚上:{{ x.duty_night_people }}</Tag>
<Tag color='red' v-if="x.duty_night_people" style="height:auto" @click.native="clickCell(x,course[index1].date)">
晚上:{{ x.duty_night_people }}</Tag>
</p>
</div>
</div>
......@@ -64,7 +70,7 @@
</p>
<p style="color:#ccc">{{ item.dept_name }}</p>
</div>
</Option>
</Select>
</FormItem>
......@@ -87,7 +93,7 @@
</template>
<script>
import { GetDutyArrangeByDateList, GetPersonByCondiction , DutyArrangeIns} from "@/api/arrangement"
import { GetDutyArrangeByDateList, GetPersonByCondiction, DutyArrangeIns } from "@/api/arrangement"
export default {
props: {
......@@ -265,8 +271,8 @@ export default {
clickCell(data, date) {
this.selectDate = date;
this.selectItem = data;
this.duty_daytime_people_id = data.duty_daytime_people_list.map(x => {return x.id});
this.duty_night_people_id = data.duty_night_people_list.map(x => {return x.id});
this.duty_daytime_people_id = data.duty_daytime_people_list.map(x => { return x.id });
this.duty_night_people_id = data.duty_night_people_list.map(x => { return x.id });
this.showModal = true;
},
// 点击确认排班
......@@ -276,7 +282,7 @@ export default {
"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,
"duty_night_people_id": this.duty_night_people_id,
}
console.log(params)
DutyArrangeIns(params).then(resp => {
......@@ -298,9 +304,9 @@ export default {
});
},
handleClose(){
this.duty_daytime_people_id = [];
this.duty_night_people_id = [];
handleClose() {
this.duty_daytime_people_id = [];
this.duty_night_people_id = [];
}
},
......
<template>
<!-- 值班分类 -->
<div>
<div class="demo-split">
<Split v-model="split">
<template #left>
<div class="demo-split-pane-L">
<!-- loading -->
<Spin v-if="treePanelLoading" size="large" fix></Spin>
<Tree :data="typeTree" @on-select-change="treeNodeChange"></Tree>
</div>
</template>
<template #right>
<div class="demo-split-pane-R">
<Card ref="card" dis-hover>
<Input v-model="params.name" placeholder="请输入关键词" style="width:200px" clearable />
<Button type="primary" class="ivu-ml-8" @click="doSearch">查找</Button>
<Button type="primary" class="ivu-ml-8" ghost :disabled="Object.keys(currentTreeNode).length == 0" @click="add">
<Icon type="md-add" />新增分类
</Button>
<Table ref="table" :columns="columns" :data="tableData" :loading="tableLoading" size='small' class="ivu-mt">
<template slot-scope="{ row, index }" slot="is_enable">
<Switch v-model="row.is_enable" size="large" :true-value="1" :false-value="0" @on-change="(val) => switchChange(val, row, index)">
<span type="md-checkmark" slot="open">启用</span>
<span type="md-close" slot="close">停用</span>
</Switch>
</template>
<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="handleDelete(row.id)">删除</a>
</div>
</template>
</Table>
<div class="ivu-mt ivu-text-center">
<Page :total="dataCount" :current.sync="params.page_index" show-total show-sizer show-elevator :page-size="params.page_size"
:page-size-opts="[10, 30, 50, 100]" @on-change="handleChangePage" @on-page-size-change="handleChangePageSize" />
</div>
</Card>
</div>
</template>
</Split>
</div>
<!-- 新增修改Modal -->
<CEditModal ref="ceditmodal" v-model="editModalshow" :formItem="formItem" :loading="editModalLoading" :formLabelWidth="100" :width="800"
@onClose="editModalshow = false" @onSubmit="modalSubmit"></CEditModal>
</div>
</template>
<script>
import * as api from '@/api/dutyType'
import CEditModal from '@/components/common/CEditModal.vue'
export default {
components: {
CEditModal,
},
data() {
return {
// 分割版面宽度
split: '250px',
// 树形版面loading
treePanelLoading: false,
// 分类树
typeTree: [],
// 选中树形菜单
currentTreeNode: {},
tableLoading: false,
tableData: [],
dataCount: 0,
columns: [
{
type: "index",
title: "序号",
align: "center",
width: 60
},
{
title: "名称",
key: "name",
},
{
title: "启用",
slot: "is_enable",
},
{
title: "操作",
slot: "action",
align: "center",
fixed: "right",
width: 150
},
],
// 搜索条件
params: {
page_index: 1,
page_size: 10,
parent_id: '1',
name: '',
},
editModalshow: false,
editModalLoading: false,
// 是否编辑 true.编辑 false.新增
isEdit: false,
// 新增编辑表单项
formItem: [
{ id: 'name', name: '分类名称', type: 'input', disabled: false, require: false, optList: [] },
{ id: 'config_id', name: '配置类型', type: 'multipleselect', disabled: false, require: false, optList: [] },
],
defaultFormData: {
id: "",
name: "",
parent_id: "",
config_id: []
},
configList: []
}
},
mounted() {
// 获取树
this.getTreeData()
this.getData()
this.GetDutyConfigSelect()
},
methods: {
// 获取树
async getTreeData() {
this.treePanelLoading = true
this.currentTreeNode = {}
api.GetClassifyTree().then(res => {
// console.log(res)
this.typeTree = this.treeFormat(res)
this.treePanelLoading = false
})
},
// 树形节点改变
treeNodeChange(val1, val2) {
// console.log('树形节点改变', val1, val2)
// 展开物资树
val2.expand = true
// 选中 / 取消节点
if (!val2.selected) {
this.currentTreeNode = {}
this.params.parent_id = '1'
} else {
this.currentTreeNode = val2
this.params.parent_id = val2.id
}
this.getData()
},
// 物资树格式化
treeFormat(arr) {
return arr.map(a => {
if (a.children && a.children.length != 0) {
a.children = this.treeFormat(a.children)
}
return {
...a,
title: a.name,
expand: a.id == '1' ? true : false,
selected: false,
}
})
},
// 获取值班配置下拉
GetDutyConfigSelect() {
api.GetDutyConfigSelect().then(resp => {
let i = this.formItem.findIndex(a => a.id == 'config_id')
this.formItem[i].optList = resp.map(a => {
return {
...a,
label: a.name,
value: a.id
}
})
})
},
// 查询列表
getData() {
this.tableLoading = true
api.QueryDutyClassify(this.params).then(res => {
// console.log('查询数据', res)
this.tableData = res.data
this.dataCount = res.data_count
this.tableLoading = false
})
},
// 改变开关
switchChange(val, row, index) {
// console.log('改变开关', val, row, index)
this.tableData[index].is_enable = val
api.ModifyDutyStatus({ id: row.id, is_enable: val }).then(res => {
this.$Message.success(res)
}).catch(() => {
this.tableData[index].is_enable = val == 0 ? 1 : 0
this.$Message.error(res.msg_detail)
})
},
// 更改页码
handleChangePage(val) {
this.params.page_index = val
this.getData()
},
// 更改每页条数
handleChangePageSize(val) {
this.params.page_size = val
if (this.params.page_index == 1) {
this.params.page_index = val
this.getData()
}
},
// 点击查询
doSearch() {
this.params.page_size = 1;
this.getData()
},
// 删除人员权限
handleDelete(id) {
this.$Modal.confirm({
title: "确定要删除吗?",
loading: true,
onOk: () => {
const params = {
id,
}
api.DeleteDuty(params).then(() => {
this.$Modal.remove();
this.$Message.success("删除成功");
this.getData();
});
},
});
},
// 新增
add() {
this.editModalshow = true
this.isEdit = false
this.$refs.ceditmodal.modalInit('add', this.defaultFormData, '新增分类')
},
// 新增编辑提交
modalSubmit(val) {
// console.log('modal提交', val)
// selectFlag: true.树形选中节点 false.树形没选中节点
let selectFlag = Object.keys(this.currentTreeNode).length != 0
val.parent_id = selectFlag ? this.currentTreeNode.id : "1"
val.config_id = val.config_id.join(';')
console.log(val)
this.$Modal.confirm({
title: '提示',
content: '是否确定提交?',
loading: true,
onOk: async () => {
const res = this.isEdit ?
await this.asc.postApiCommodityCommoditySave(val) :
await api.AddDutyType(val);
this.$Message.success(res)
this.editModalshow = false
this.getData()
this.getTreeData()
this.$Modal.remove()
}
})
},
}
}
</script>
<style scoped lang="less">
.demo-split {
height: calc(~"100vh - 112px");
.demo-split-pane-L {
padding: 10px;
height: 100%;
background-color: white;
}
.demo-split-pane-R {
padding-left: 8px;
}
}
</style>
\ No newline at end of file
<template>
<div class="container">
<img src="@/assets/images/功能调整中.png" class="img-bg" />
<strong style="font-size:20px;display: block;margin-top:16px">功能调整中</strong>
</div>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="less" scoped>
.container {
text-align: center;
.img-bg {
width: 300px;
text-align: center;
}
}
</style>
\ No newline at end of file
<template>
<div>
<h2>模板配置</h2>
<Card :bordered="false" dis-hover ref="card">
<div style="display: flex; justify-content: space-between">
<Upload
multiple
action="/feedback/api/Config/ExportTemplate/Upload"
:before-upload="handleUpload"
:on-success="handleSuccess"
:show-upload-list="false"
:headers="{ Authorization: token }"
:format="['docx']"
:on-format-error="handleFormatError"
>
<Button type="primary" ghost icon="ios-cloud-upload-outline">
模板上传
</Button>
</Upload>
<div>
<Button
type="primary"
style="margin-right: 20px"
@click="handleCheckField"
>
模板字段查看
</Button>
<Button type="primary" @click="doSave" :disabled="!tipsFlag">
保存
</Button>
</div>
</div>
<Table
ref="table"
:columns="columns"
:data="tableData"
:loading="loading"
class="ivu-mt"
>
<template slot-scope="{ row, index }" slot="name">
<div v-if="isEditIndex !== index">
<!-- <strong>{{ row.name }}</strong> -->
<a class="formwork-name" @click="handleDownload(row)">{{
row.name
}}</a>
<Button
ghost
type="text"
size="small"
icon="ios-create-outline"
@click="handleEdit(row.name, index)"
style="color: #515a6e"
></Button>
</div>
<div v-else>
<Input v-model="formWorkName" placeholder="请输入模板名称">
<Button
slot="append"
icon="md-checkmark"
@click="confirmEdit(index)"
></Button>
</Input>
</div>
</template>
<template slot-scope="{ row }" slot="useFlag">
<Switch
v-model="row.useFlag"
true-color="#52c41a"
:true-value="1"
:false-value="0"
false-color="#cccccc"
size="large"
@on-change="handleChanget($event, row)"
>
<span slot="open">启用</span>
<span slot="close">停用</span>
</Switch>
</template>
<template slot-scope="{ row }" slot="action">
<div @click.stop.prevent>
<Button
type="primary"
icon="ios-eye-outline"
size="small"
@click="handlePreview(row)"
>预览</Button
>
<Divider type="vertical" />
<Button
type="error"
icon="ios-trash-outline"
size="small"
@click="handleDelete(row)"
>删除</Button
>
<!-- <Icon type="ios-eye-outline" /> -->
</div>
</template>
</Table>
<div class="ivu-mt" v-if="tipsFlag">
<Alert type="warning" show-icon>
修改配置后必须点击保存修改按钮,否则不生效
</Alert>
</div>
</Card>
<Drawer :closable="false" v-model="previewVisible" width="70%">
<div slot="header" style="display: flex; align-items: center">
<h3 style="margin-right: 20px">模板预览</h3>
<Select
v-model="withData"
style="width: 200px"
@on-change="selectChange"
>
<Option
v-for="item in cityList"
:value="item.value"
:key="item.value"
>{{ item.label }}</Option
>
</Select>
</div>
<iframe :src="previewUrl" style="width: 100%; height: 100%"></iframe>
</Drawer>
<!-- 模板字段表格 -->
<Modal
v-model="fieldModal"
title="待处理人"
@on-ok="fieldModal = false"
width="50%"
>
<Table
ref="table"
:loading="fieldLoading"
:columns="fieldColumns"
:data="fieldTableData"
max-height="600"
>
</Table>
</Modal>
</div>
</template>
<script>
import * as api from "@api/set";
import util from "@/libs/util";
export default {
data() {
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: false,
tableData: [],
isEditIndex: undefined, // 用于判断第几个处于编辑状态
formWorkName: "", // 模板名称
value: "",
token: "",
tipsFlag: false, //提示
previewVisible: false,
previewUrl: "",
withData: 0,
cityList: [
{
value: 0,
label: "不填充数据",
},
{
value: 1,
label: "填充数据",
},
],
row: {},
fieldModal:false,
fieldLoading:false,
fieldColumns:[
{ type: "index", width: 60, align: "center" },
{
key:'value',
title:'字段值'
},
{
key:'label',
title:'字段名'
},
],
fieldTableData:[],
};
},
computed: {},
created() {
this.getTemplateList();
this.token = "Bearer " + util.cookies.get("token");
},
methods: {
// 获取模板列表
getTemplateList() {
this.loading = true;
api.getTemplateList().then((resp) => {
this.loading = false;
this.tableData = resp;
});
},
// 模板预览
handlePreview(row) {
if (row) {
this.row = row;
}
this.previewUrl = "";
const config = {
params: {
filePath: this.row.path,
},
};
api.PreviewTemplate(config, this.withData).then((resp) => {
this.previewUrl = resp.pdf;
});
this.previewVisible = true;
},
// 编辑模板名称
handleEdit(name, i) {
this.formWorkName = name;
this.isEditIndex = i;
},
confirmEdit(i) {
this.tableData[i].name = this.formWorkName;
this.formWorkName = this.isEditIndex = undefined;
this.tipsFlag = true;
},
// 文件上传前
handleUpload() {
this.loading = true;
return true;
},
// 文件上传成功
handleSuccess(res, file) {
this.loading = false;
if (res.code == 1) {
this.tableData.push(res.response);
this.tipsFlag = true;
} else {
this.$Message.error(res.msg_detail);
}
},
// 状态修改
handleChanget(value, row) {
this.tipsFlag = true;
this.tableData.map((item, index) => {
item.useFlag = 0;
});
if (value == 1) {
this.tableData.map((item, index) => {
if (index == row._index) {
item.useFlag = value;
}
});
}
},
// 保存
doSave() {
if (this.loading) return;
this.loading = true;
this.tipsFlag = false;
api.UpdateTemplate(this.tableData).then((resp) => {
this.loading = false;
this.$Message.success(resp);
this.getTemplateList();
});
},
// 删除
handleDelete(row) {
this.$Modal.confirm({
title: "删除提示",
content: "是否确定删除?",
okText: "确定",
cancelText: "取消",
onOk: () => {
this.tableData = this.tableData.filter((item, index) => {
return row._index !== index;
});
this.doSave();
},
});
},
handleDownload(row) {
window.location.href = row.path;
},
handleFormatError(file) {
this.loading = false;
this.$Notice.error({
title: "文件类型上传错误",
desc: "只接受docx的文件类型",
});
},
selectChange() {
this.handlePreview();
},
// 模板字段查看
handleCheckField() {
this.fieldModal = true;
this.fieldLoading = true;
api.getField().then((resp) => {
this.fieldLoading = false;
this.fieldTableData = resp
});
},
},
};
</script>
<style lang="less" scoped>
.page-sys-role {
&-drawer {
&-footer {
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
}
}
.formwork-name {
color: #333;
font-weight: bold;
}
.formwork-name:hover {
color: #2d8cf0;
}
</style>
<template>
<div>
<h2>人员选择器配置</h2>
<Card :bordered="false" dis-hover ref="card">
<div style="display: flex; justify-content: space-between">
<!-- <Button type="primary" ghost icon="md-eye"> 全局预览 </Button> -->
<Button type="primary" @click="doSave" :disabled="!tipsFlag">
保存
</Button>
</div>
<Table
ref="table"
:columns="columns"
:data="list"
:loading="loading"
class="ivu-mt"
>
<template slot-scope="{ row }" slot="useFlag">
<Switch
v-model="row.useFlag"
true-color="#52c41a"
:true-value="1"
:false-value="0"
false-color="#cccccc"
size="large"
@on-change="handleChanget($event, row)"
>
<span slot="open">启用</span>
<span slot="close">停用</span>
</Switch>
</template>
<template slot-scope="{ row }" slot="action">
<div @click.stop.prevent>
<Button
type="primary"
icon="ios-eye-outline"
size="small"
@click="handlePreview(row)"
>预览</Button
>
</div>
</template>
<template slot-scope="{ index }" slot="orderby">
<ButtonGroup>
<Button
@click="orderby(index, 'up')"
:disabled="index === 0"
icon="md-arrow-up"
/>
<Button
@click="orderby(index, 'down')"
:disabled="index === list.length - 1"
icon="md-arrow-down"
/>
</ButtonGroup>
</template>
</Table>
<div class="ivu-mt" v-if="tipsFlag">
<Alert type="warning" show-icon>
修改配置后必须点击保存修改按钮,否则不生效
</Alert>
</div>
</Card>
<Modal v-model="previewModal" title="人员选择器预览" width="50%">
<Table
ref="table"
:columns="previewColumns"
:data="previewTable"
:loading="previewLoading"
class="ivu-mt"
max-height="600"
>
<template slot-scope="{ row }" slot="Tag1">
<Tag color="primary">{{ row.tag1 }}</Tag>
</template>
<template slot-scope="{ row }" slot="Tag2">
<Tag color="success">{{ row.tag2 }}</Tag>
</template>
</Table>
<div slot="footer" class="preview-footer">
<div class="tips">
<Alert type="warning" show-icon> 预览数据项最多20条 </Alert>
</div>
<div class="footer-button">
<Button @click="previewModal = false">取消</Button>
<Button type="primary" @click="previewModal = false">确定</Button>
</div>
</div>
</Modal>
</div>
</template>
<script>
import * as api from "@api/set";
import util from "@/libs/util";
export default {
data() {
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: false,
disabled: false,
list: [],
value: "",
tipsFlag: false, //提示
previewTable: [],
previewColumns: [],
previewModal: false,
previewLoading: false,
};
},
created() {
this.getPeopleSelectList();
},
methods: {
getPeopleSelectList() {
this.loading = true;
api.getPeopleSelectList().then((resp) => {
console.log(resp);
this.loading = false;
this.list = resp;
});
},
handleChanget(value, row) {
this.list.map((item, index) => {
if (row._index == index) item.useFlag = value;
});
this.tipsFlag = true;
},
// 排序
orderby(i, type) {
this.list.splice(
i,
1,
...this.list.splice(type === "up" ? i - 1 : i + 1, 1, this.list[i])
);
this.tipsFlag = true;
},
// 保存
doSave() {
if (this.loading) return;
this.loading = true;
this.tipsFlag = false;
api.UpdateSelectList(this.list).then((resp) => {
this.loading = false;
this.$Message.success(resp);
this.getPeopleSelectList();
});
},
// 预览
handlePreview(row) {
this.previewColumns = [];
const config = {
params: {
Id: row.id,
},
};
if (this.previewLoading) return;
this.previewModal = true;
this.previewLoading = true;
api.PreviewSelectList(config).then((resp) => {
this.previewLoading = false;
this.previewTable = resp.data;
if (this.previewColumns.length <= 0) {
this.previewColumns = [
{
type: "index",
width: 60,
align: "center",
},
];
resp.title.map((item) => {
let obj = {};
if (item.show_type == 1) {
Object.assign(obj, {
slot: item.field_id,
title: item.show_name,
});
} else {
Object.assign(obj, {
key: item.field_id,
title: item.show_name,
});
}
this.previewColumns.push(obj);
});
}
});
},
},
};
</script>
<style lang="less" scoped>
.page-sys-role {
&-drawer {
&-footer {
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
}
}
.preview-footer {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
此差异已折叠。
<template>
<div>
<Row :gutter="24">
<Col :xl="6" :lg="6" :md="0" :sm="0" :xs="0">
<Card shadow title="通用设置" icon="md-options" :padding="0">
<CellGroup @on-click="handleChangeCell" class="ivu-pt-8 ivu-pb-8">
<Cell
title="1、反馈类型"
name="type"
label="反馈类型选项的设置"
:selected="currentType === 'type'"
/>
<Cell
title="2、表单管理"
name="fields"
label="自定义表单的字段"
:selected="currentType === 'fields'"
/>
<!-- <Cell
title="3、导出模板"
name="formwork"
label="导出文档模板上传"
:selected="currentType === 'formwork'"
/> -->
<Cell
title="3、人员选择器"
name="selector"
label="移动端人员选择器配置"
:selected="currentType === 'selector'"
/>
<Cell
title="4、其他"
name="other"
label="是否公开,消息提醒,角色操作等配置"
:selected="currentType === 'other'"
/>
</CellGroup>
</Card>
</Col>
<Col :xl="18" :lg="18" :md="24" :sm="24" :xs="24">
<Card :bordered="false" dis-hover>
<Row>
<Col :xl="0" :lg="0" :md="24" :sm="24" :xs="24">
<Tabs :value="currentType" @on-click="handleChangeCell">
<TabPane label="反馈表单" name="fields" />
<TabPane label="反馈类型" name="type" />
<!-- <TabPane label="导出模板" name="formwork" /> -->
<TabPane label="人员选择器" name="selector" />
<TabPane label="其他" name="other" />
</Tabs>
</Col>
</Row>
<fields v-if="currentType === 'fields'" />
<type v-if="currentType === 'type'" />
<!-- <Formwork v-if="currentType === 'formwork'" /> -->
<Selector v-if="currentType === 'selector'" />
<OtherSetting v-if="currentType === 'other'" />
</Card>
</Col>
</Row>
</div>
</template>
<script>
import fields from './fields';
import type from './type';
import Formwork from './Formwork';
import Selector from './Selector';
import OtherSetting from './othersetting';
export default {
name: 'setting-account',
components: { fields, type,Selector,Formwork,OtherSetting },
data() {
return {
currentType: 'type' // info | safety | account | notification
}
},
methods: {
handleChangeCell(name) {
this.currentType = name;
}
}
}
</script>
<template>
<div>
<Table ref="table" :loading="loading" :columns="columns" :data="tableData">
<template slot-scope="{ row, index }" slot="des">
<div
v-if="rechristenIndex !== index"
style="
display: flex;
justify-content: space-between;
align-items: center;
"
>
{{ row.des }}
<Button
ghost
type="text"
size="small"
icon="ios-create-outline"
@click="handleRechristen(row.des, index)"
style="color: #515a6e"
></Button>
</div>
<div v-else>
<Input v-model="rechristenValue" placeholder="请输入字段名">
<Button
slot="append"
icon="md-checkmark"
@click="confirmRechristen(index)"
></Button>
</Input>
</div>
</template>
</Table>
<div class="ivu-mt" v-if="tipsFlag">
<Alert type="warning" show-icon>
修改配置后必须点击保存修改按钮,否则不生效
</Alert>
<div style="text-align: center">
<Button type="primary" @click="update" :loading="saveLoading">
保存修改
</Button>
</div>
</div>
</div>
</template>
<script>
import * as api from "@api/set";
export default {
data() {
return {
columns: [
{
type: "index",
width: 60,
align: "center",
},
{
key: "key",
title: "字段名",
},
{
slot: "des",
title: "字段描述",
},
],
tableData: [],
rechristenIndex: undefined,
rechristenValue: undefined,
tipsFlag: false,
saveLoading: false,
};
},
created() {
this.getBtnList();
},
methods: {
getBtnList() {
this.loading = true;
api
.getBtnList()
.then((resp) => {
this.loading = false;
for (let key in resp) {
this.tableData.push({
key: key,
des: resp[key],
});
}
})
.catch((error) => {
this.loading = false;
});
},
handleRechristen(name, i) {
this.rechristenValue = name;
this.rechristenIndex = i;
},
confirmRechristen(i) {
this.tableData[i].des = this.rechristenValue;
this.rechristenValue = this.rechristenIndex = undefined;
this.tipsFlag = true;
},
update() {
this.saveLoading = true;
this.loading = true;
let params = {};
this.tableData.map((item) => {
params[item.key] = item.des;
});
api.UpdateBtn(params).then((resp) => {
this.saveLoading = false;
this.loading = false;
this.tipsFlag = false;
this.$Message.success(resp);
});
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<Table ref="table" :loading="loading" :columns="columns" :data="tableData">
<template slot-scope="{ row, index }" slot="des">
<div
v-if="rechristenIndex !== index"
style="
display: flex;
justify-content: space-between;
align-items: center;
"
>
{{ row.des }}
<Button
ghost
type="text"
size="small"
icon="ios-create-outline"
@click="handleRechristen(row.des, index)"
style="color: #515a6e"
></Button>
</div>
<div v-else>
<Input v-model="rechristenValue" placeholder="请输入字段名">
<Button
slot="append"
icon="md-checkmark"
@click="confirmRechristen(index)"
></Button>
</Input>
</div>
</template>
</Table>
<div class="ivu-mt" v-if="tipsFlag">
<Alert type="warning" show-icon>
修改配置后必须点击保存修改按钮,否则不生效
</Alert>
<div style="text-align: center">
<Button type="primary" @click="update" :loading="saveLoading">
保存修改
</Button>
</div>
</div>
</div>
</template>
<script>
import * as api from "@api/set";
export default {
data() {
return {
columns: [
{
type: "index",
width: 60,
align: "center",
},
{
key: "key",
title: "字段名",
},
{
slot: "des",
title: "字段描述",
},
],
tableData: [],
rechristenIndex: undefined,
rechristenValue: undefined,
tipsFlag: false,
saveLoading: false,
};
},
created() {
this.getBtnList();
},
methods: {
getBtnList() {
this.loading = true;
api
.getClassifyList()
.then((resp) => {
this.loading = false;
for (let key in resp) {
this.tableData.push({
key: key,
des: resp[key],
});
}
})
.catch((error) => {
this.loading = false;
});
},
handleRechristen(name, i) {
this.rechristenValue = name;
this.rechristenIndex = i;
},
confirmRechristen(i) {
this.tableData[i].des = this.rechristenValue;
this.rechristenValue = this.rechristenIndex = undefined;
this.tipsFlag = true;
},
update() {
this.saveLoading = true;
this.loading = true;
let params = {};
this.tableData.map((item) => {
params[item.key] = item.des;
});
api.UpdateClassifyList(params).then((resp) => {
this.saveLoading = false;
this.loading = false;
this.tipsFlag = false;
this.$Message.success(resp);
});
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" :key="refreshKey" >
<tr>
<th>操作</th>
<th>提醒人</th>
</tr>
<tr>
<td>{{ buttonType.submit }}</td>
<td>
<CheckboxGroup v-model="submit">
<Checkbox :label="roleType.hander && roleType.hander.key">{{
roleType.hander && roleType.hander.description
}}</Checkbox>
<Checkbox :label="roleType.ccRecipient && roleType.ccRecipient.key">{{
roleType.ccRecipient && roleType.ccRecipient.description
}}</Checkbox>
<Checkbox :label="roleType.leader && roleType.leader.key">{{
roleType.leader&& roleType.leader.description
}}</Checkbox>
</CheckboxGroup>
</td>
</tr>
<tr>
<td>{{ buttonType.transfer }}</td>
<td>
<CheckboxGroup v-model="transfer">
<Checkbox :label="roleType.hander && roleType.hander.key">{{
roleType.hander&& roleType.hander.description
}}</Checkbox>
<Checkbox :label="roleType.leader && roleType.leader.key">{{
roleType.leader && roleType.leader.description
}}</Checkbox>
</CheckboxGroup>
</td>
</tr>
<tr>
<td>{{ buttonType.reply }}</td>
<td>
<CheckboxGroup v-model="reply">
<Checkbox :label="roleType.supervisor && roleType.supervisor.key">{{
roleType.supervisor && roleType.supervisor.description
}}</Checkbox>
<Checkbox :label="roleType.leader && roleType.leader.key">{{
roleType.leader && roleType.leader.description
}}</Checkbox>
</CheckboxGroup>
</td>
</tr>
<tr>
<td>{{ buttonType.leaderComment }}</td>
<td>
<CheckboxGroup v-model="leaderComment">
<Checkbox :label="roleType.supervisor && roleType.supervisor.key">{{
roleType.supervisor && roleType.supervisor.description
}}</Checkbox>
</CheckboxGroup>
</td>
</tr>
<tr>
<td>{{ buttonType.delayCompleted }}</td>
<td>
<CheckboxGroup v-model="delayCompleted">
<Checkbox :label="roleType.leader && roleType.leader.key">{{
roleType.leader && roleType.leader.description
}}</Checkbox>
</CheckboxGroup>
</td>
</tr>
<tr>
<td>{{ buttonType.completed }}</td>
<td>
<CheckboxGroup v-model="completed">
<Checkbox :label="roleType.leader && roleType.leader.key">{{
roleType.leader && roleType.leader.description
}}</Checkbox>
</CheckboxGroup>
</td>
</tr>
<tr>
<td>{{ buttonType.reopen }}</td>
<td>
<CheckboxGroup v-model="reopen">
<Checkbox :label="roleType.leader && roleType.leader.key">{{
roleType.leader && roleType.leader.description
}}</Checkbox>
</CheckboxGroup>
</td>
</tr>
</table>
<div class="save-btn">
<Button type="primary" size='large' @click="doSave">保存修改</Button>
</div>
<Spin size="large" fix v-if="spinShow"></Spin>
</div>
</template>
<script>
import * as api from "@api/set";
export default {
data() {
return {
buttonType: {},
roleType: {},
spinShow:false,
submit: [],
transfer: [],
reply: [],
leaderComment: [],
delayCompleted: [],
completed: [],
reopen: [],
refreshKey:new Date().getTime()
};
},
created() {
this.getMessageList();
},
methods: {
getMessageList() {
this.spinShow = true;
api.getMessageList().then((resp) => {
this.spinShow = false;
this.completed = resp.data.completed;
this.delayCompleted = resp.data.delayCompleted;
this.leaderComment = resp.data.leaderComment;
this.reopen = resp.data.reopen;
this.reply = resp.data.reply;
this.submit = resp.data.submit;
this.transfer = resp.data.transfer;
this.roleType = resp.roleType;
this.buttonType = resp.buttonType;
this.refreshKey = new Date().getTime();
});
},
doSave(){
const params ={
submit:this.submit,
transfer:this.transfer,
reply:this.reply,
leaderComment:this.leaderComment,
delayCompleted:this.delayCompleted,
completed:this.completed,
reopen:this.reopen,
}
this.spinShow = true;
api.UpdateMessage(params).then(resp => {
this.spinShow = false;
this.$Message.success(resp)
})
}
},
};
</script>
<style scoped>
table {
/* margin:10px; */
width: 100%;
height: 400px;
border-left: 1px solid #666666;
border-bottom: 1px double #666666;
}
tbody tr {
text-align: center;
}
th,
td {
border-right: 1px solid #666;
border-top: 1px solid #666;
}
td {
text-align: center;
}
.save-btn{
text-align: center;
margin-top: 20px;
}
</style>
\ No newline at end of file
<template>
<div style=" display: flex;
justify-content: center;text-align:center;">
<Card style="width:400px" dis-hover>
<span style="margin-right:10px;">是否默认公开:</span>
<Switch v-model="switchValue" @on-change="switchChange" true-color="#13ce66" />
<p class="tips">此项开启后,提交的反馈将默认公示</p>
</Card>
</div>
</template>
<script>
import * as api from "@api/set";
export default {
data(){
return {
switchValue:false
}
},
created(){
this.getDefaultPublic();
},
methods:{
getDefaultPublic(){
api.getDefaultPublic().then(resp => {
if(resp == 1){
this.switchValue = true;
}else{
this.switchValue = false;
}
})
},
switchChange(value){
const params = {
status:value == true ? 1 : 0
}
api.UpdateDefaultPublic(params).then(resp => {
this.$Message.success(resp)
})
}
}
}
</script>
<style scoped>
.tips{
color: #999;
font-size: 12px;
margin-top: 22px;
}
</style>
\ No newline at end of file
<template>
<div>
<Tabs v-model="selectTab">
<TabPane
:label="item.label"
:name="item.name"
v-for="(item, index) in tabsData"
:key="index"
></TabPane>
</Tabs>
<OpenSetting v-if="selectTab == 'settingOpen'" />
<MessageSetting v-if="selectTab == 'messageSetting'" />
<RoleSetting v-if="selectTab == 'roleSetting'" />
<BtnSetting v-if="selectTab == 'btnSetting'" />
<ClassifySetting v-if="selectTab == 'classifySetting'" />
</div>
</template>
<script>
import MessageSetting from "./MessageSetting";
import OpenSetting from "./OpenSetting";
import RoleSetting from "./RoleSetting";
import BtnSetting from "./BtnSetting";
import ClassifySetting from "./ClassifySetting";
export default {
data() {
return {
tabsData: [
{
label: "消息提醒配置",
name: "messageSetting",
},
{
label: "角色操作配置",
name: "roleSetting",
},
{
label: "功能按钮名称配置",
name: "btnSetting",
},
{
label: "栏目分类名称配置",
name: "classifySetting",
},
{
label: "默认公开配置",
name: "settingOpen",
},
],
selectTab: "messageSetting",
};
},
components: {
MessageSetting,
OpenSetting,
RoleSetting,
BtnSetting,
ClassifySetting
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<h2>反馈类型</h2>
<Card :bordered="false" dis-hover ref="card">
<Button type="primary" ghost icon="md-add" @click="handleOpenCreate">
添加分类
</Button>
<Table ref="table" :columns="columns" :data="list" :loading="loading" class="ivu-mt">
<template slot-scope="{ row }" slot="enable_status">
<Switch v-model="row.enable_status === 1" true-color="#52c41a" false-color="#cccccc" size="large" :disabled="disabled"
@on-change="handleChanget($event, row)">
<span slot="open">启用</span>
<span slot="close">停用</span>
</Switch>
</template>
<template slot-scope="{ row }" slot="action">
<div @click.stop.prevent>
<a type="text" @click="handleEdit(row)">编辑</a>
<Divider type="vertical" />
<a type="text" @click="handleDel(row.id)">删除</a>
</div>
</template>
<template slot-scope="{ index }" slot="orderby">
<ButtonGroup>
<Button @click="orderby(index, 'up')" :disabled="index === 0" icon="md-arrow-up" />
<Button @click="orderby(index, 'down')" :disabled="index === list.length - 1" icon="md-arrow-down" />
</ButtonGroup>
</template>
</Table>
<!-- <div class="ivu-mt ivu-text-center">
<Page
:total="total"
:current.sync="current"
show-total
show-sizer
show-elevator
:page-size="limit"
/>
</div> -->
</Card>
<Modal v-model="showModal" title="添加分类" @on-ok="handleAdd" :loading="modalLoading">
<Form :model="addForm" label-position="right" :label-width="100" ref="addForm" :rules="ruleValidate">
<FormItem label="加减分" prop='add_or_reduce'>
<Select v-model="addForm.add_or_reduce">
<Option v-for="item in options" :value="item.id" :key="item.id">{{
item.label
}}</Option>
</Select>
</FormItem>
<FormItem label="行为类型" prop='type_name'>
<Input v-model="addForm.type_name" />
</FormItem>
<FormItem label="行为描述">
<Input v-model="addForm.type_desc" />
</FormItem>
<FormItem label="行为得分">
<InputNumber v-model="addForm.score"></InputNumber>
</FormItem>
</Form>
</Modal>
<Modal v-model="showEditModal" title="编辑分类" @on-ok="confirmEdit" :loading="modalLoading">
<Form :model="editForm" label-position="right" :label-width="100" ref="editForm" :rules="ruleValidate">
<FormItem label="加减分" prop='add_or_reduce'>
<Select v-model="editForm.add_or_reduce">
<Option v-for="item in options" :value="item.id" :key="item.id">{{
item.label
}}</Option>
</Select>
</FormItem>
<FormItem label="行为类型" prop='type_name'>
<Input v-model="editForm.type_name" />
</FormItem>
<FormItem label="行为描述">
<Input v-model="editForm.type_desc" />
</FormItem>
<FormItem label="行为得分">
<InputNumber v-model="editForm.score"></InputNumber>
</FormItem>
</Form>
</Modal>
</div>
</template>
<script>
import { OptionList, OptionAdd, OptionUpdate, OptionEnable, OptionSort, OptionDelete, AddOrReduceList } from '@api/set';
export default {
data() {
return {
columns: [
],
loading: false,
disabled: false,
list: [],
total: 0,
value: '',
pageIndex: 1,
pageSize: 20,
showModal: false,
showEditModal:false,
addForm: {
add_or_reduce: '',
type_name: '',
type_desc: '',
score: 0
},
editForm: {
add_or_reduce: '',
type_name: '',
type_desc: '',
score: 0
},
options: [],
modalLoading: true,
ruleValidate: {
add_or_reduce: [
{ required: true, message: '请选择加减分', trigger: 'change' }
],
type_name: [
{ required: true, message: '请填写行为类型', trigger: 'blur' }
]
},
row:{}
}
},
computed: {
},
created() {
this.getData();
this.AddOrReduceList();
},
methods: {
getData() {
if (this.loading) return;
this.loading = true;
const params = {
pageIndex: this.pageIndex,
pageSize: this.pageSize,
keyWord: '',
}
OptionList(params).then(resp => {
this.list = resp.data;
this.total = resp.dataCount;
this.loading = false;
if (this.columns.length <= 0) {
this.columns = [
{
type: "index",
width: 80,
align: "center",
title: '序号'
},
];
resp.title.map((item) => {
let obj = {};
if (item.order_by_flag == 1) {
Object.assign(obj, { sortable: "custom" });
}
if (item.show_type == 1) {
Object.assign(obj, {
slot: item.field_id,
title: item.show_name,
});
} else {
Object.assign(obj, {
key: item.field_id,
title: item.show_name,
});
}
this.columns.push(obj);
});
this.columns.push({
title: "操作",
slot: "action",
});
}
});
},
handleOpenCreate() {
this.showModal = true
},
handleEdit(data) {
this.editForm.type_name = data.type_name;
this.editForm.type_desc = data.type_desc;
this.editForm.add_or_reduce = data.add_or_reduce;
this.editForm.score = data.score;
this.row = data
this.showEditModal = true;
},
handleChanget(flag, data) {
if (this.disabled) return;
this.disabled = true
OptionEnable(data.id).then(() => {
this.$Message.success('修改成功');
this.disabled = false
}).catch(() => {
this.disabled = false
})
},
orderby(i, type) {
let data = {}
switch (type) {
case 'up':// 上移
data = {
one: this.list[i - 1].id,
two: this.list[i].id
}
break;
case 'down':
data = {
one: this.list[i].id,
two: this.list[i + 1].id
}
break;
}
OptionSort(data).then(() => {
this.list.splice(i, 1, ...this.list.splice((type === 'up' ? i - 1 : i + 1), 1, this.list[i]))
})
},
handleDel(id) {
this.$Modal.confirm({
title: '确定要删除吗?',
onOk: () => {
OptionDelete(id).then(() => {
this.$Message.success('删除成功');
this.getData();
})
}
});
},
AddOrReduceList() {
AddOrReduceList().then(resp => {
this.options = resp;
})
},
handleAdd() {
this.$refs.addForm.validate(valid => {
if (valid) {
OptionAdd(this.addForm).then(resp => {
this.handleModalLoading();
this.showModal = false
this.$Message.success('添加成功');
this.getData()
}).catch(() => {
this.handleModalLoading();
})
} else {
this.handleModalLoading();
this.$Message.error('表单校验不通过');
}
})
},
confirmEdit() {
this.$refs.editForm.validate(valid => {
if (valid) {
const params = {
...this.editForm,
id:this.row.id
}
OptionUpdate(params).then(resp => {
this.handleModalLoading();
this.showEditModal = false
this.$Message.success('编辑成功');
this.getData()
}).catch(() => {
this.handleModalLoading();
})
} else {
this.handleModalLoading();
this.$Message.error('表单校验不通过');
}
})
},
// 处理弹框loading
handleModalLoading() {
this.modalLoading = false;
this.$nextTick(() => {
this.modalLoading = true;
});
},
}
}
</script>
<style lang="less">
.page-sys-role {
&-drawer {
&-footer {
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
}
}
</style>
<template>
<div class="container">
<img src="@/assets/images/功能调整中.png" class="img-bg" />
<strong style="font-size:20px;display: block;margin-top:16px">功能调整中</strong>
</div>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="less" scoped>
.container {
text-align: center;
.img-bg {
width: 300px;
text-align: center;
}
}
</style>
\ No newline at end of file
......@@ -108,7 +108,6 @@ export default {
"page_size": this.pageSize
}
GetOperationLogList(params).then(resp => {
console.log(resp)
this.tableData = resp.data;
this.total = resp.data_count
})
......
......@@ -15,41 +15,59 @@ export default {
meta,
component: BasicLayout,
children: [
// {
// path: 'common',
// name: `${pre}common`,
// meta: {
// ...meta,
// title: '通用设置'
// },
// component: () => import('@/pages/set/common')
// },
// {
// path: 'permission',
// name: `${pre}permission`,
// meta: {
// ...meta,
// title: '权限设置'
// },
// component: () => import('@/pages/set/permission')
// },
{
path: 'common',
name: `${pre}common`,
path: 'role',
name: `${pre}role`,
meta: {
...meta,
title: '通用设置'
auth: ['role'],
title: '角色设置'
},
component: () => import('@/pages/set/common')
component: () => import('@/pages/set/role')
},
{
path: 'permission',
name: `${pre}permission`,
meta: {
...meta,
title: '权限设置'
auth: ['permission'],
title: '人员权限设置'
},
component: () => import('@/pages/set/permission')
},
{
path: 'role',
name: `${pre}role`,
path: 'logList',
name: `${pre}logList`,
meta: {
...meta,
title: '角色设置'
title: '操作日志',
auth: ['logList']
},
component: () => import('../../pages/set/role')
component: () => import('@/pages/set/logList/index.vue')
},
{
path: 'permission',
name: `${pre}permission`,
path: 'initset',
name: `${pre}initset`,
meta: {
...meta,
title: '人员权限设置'
title: '初始化设置',
auth: ['initset']
},
component: () => import('../../pages/set/permission')
component: () => import('@/pages/set/initset/index.vue')
},
]
......
......@@ -18,19 +18,29 @@ const frameIn = [{
name: 'arrangement',
meta: {
title: '值班安排',
auth: ['user']
auth: ["arrangement"]
},
component: () => import('@/pages/arrangement/index.vue')
},
{
path: 'logList',
name: 'logList',
path: 'dutyType',
name: 'dutyType',
meta: {
title: '日志列表',
auth: ['user']
title: '值班分类',
auth: ["dutyType"]
},
component: () => import('@/pages/logList/index.vue')
component: () => import('@/pages/dutyType/index.vue')
},
{
path: 'dutychange',
name: 'dutychange',
meta: {
title: '调班备案',
auth: ["dutychange"]
},
component: () => import('@/pages/dutychange/index.vue')
},
// {
// path: 'log',
// name: 'log',
......
......@@ -22,7 +22,7 @@ export default {
util.cookies.set('duty-token', res.access_token.token_content);
await GetLoginUserInfo().then(async resp => {
info = resp;
info.access = role;
info.access = resp.role_capacity_list;
});
// 设置 vuex 用户信息
await dispatch('admin/user/set', info, { root: true });
......@@ -44,7 +44,7 @@ export default {
util.cookies.set('duty-token', res.access_token.token_content);
await GetLoginUserInfo().then(async resp => {
info = resp;
info.access = role;
info.access = resp.role_capacity_list;
});
// 设置 vuex 用户信息
await dispatch('admin/user/set', info, { root: true });
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或