HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/uileague/cms/js/chunk-89031252.791a5992.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-89031252","chunk-d9bb2b7c","chunk-2d21f25e","chunk-2d0e271e"],{"0bf4":function(e,t,n){"use strict";var i=n("2d22"),a=n.n(i);a.a},"1f2b":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tableSample"},[n("div",{staticClass:"header"},[n("div",{staticClass:"header-left"},[n("lin-search",{attrs:{placeholder:"搜索"},on:{query:e.onQueryChange}})],1),n("div",{staticClass:"header-right"},[e.canAdd?n("el-button",{attrs:{type:"primary",round:""},on:{click:e.handAdd}},[e._v("添加位置"),n("i",{staticClass:"el-icon-circle-plus-outline el-icon--right"})]):e._e()],1)]),n("div",{staticClass:"table-main"},[n("el-dialog",{attrs:{top:"5vh",width:"60%",visible:e.dialogTableVisible},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[n("span",[e._v("選擇要展示的列:")]),n("el-checkbox-group",{staticClass:"m-20",on:{change:e.handleChange},model:{value:e.checkList,callback:function(t){e.checkList=t},expression:"checkList"}},e._l(e.tempCheckList,(function(e){return n("el-checkbox",{key:e,attrs:{disabled:"標題"===e||"排名"===e,label:e}})})),1),n("span",[e._v("選擇固定在左側的列:")]),n("el-checkbox-group",{staticClass:"m-20",model:{value:e.fixedLeftList,callback:function(t){e.fixedLeftList=t},expression:"fixedLeftList"}},e._l(e.tempCheckList,(function(t){return n("el-checkbox",{key:t,attrs:{disabled:e.fixedRightList.indexOf(t)>-1||-1===e.checkList.indexOf(t),label:t}})})),1),n("span",[e._v("選擇固定在右側的列:")]),n("el-checkbox-group",{staticClass:"m-20",model:{value:e.fixedRightList,callback:function(t){e.fixedRightList=t},expression:"fixedRightList"}},e._l(e.tempCheckList,(function(t){return n("el-checkbox",{key:t,attrs:{disabled:e.fixedLeftList.indexOf(t)>-1||-1===e.checkList.indexOf(t),label:t}})})),1)],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.tableData,id:"out-table'"},on:{"row-dblclick":e.rowClick}},[e._l(e.filterTableColumn,(function(t){return["排序"===t.label?n("el-table-column",{key:t.label,attrs:{label:"排序"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("input",{directives:[{name:"model",rawName:"v-model",value:t.row.sorting,expression:"props.row.sorting"}],staticClass:"sort-input",attrs:{type:"number"},domProps:{value:t.row.sorting},on:{blur:function(n){return e.handleSort(t.row.sorting,t.row)},input:function(n){n.target.composing||e.$set(t.row,"sorting",n.target.value)}}})]}}],null,!0)}):e._e(),t.noRepeat?e._e():n("el-table-column",{key:t.label,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":!0,fixed:!!t.fixed&&t.fixed,width:t.width?t.width:""}}),"status"===t.prop?n("el-table-column",{key:t.label,attrs:{label:t.label,"show-overflow-tooltip":!0,fixed:!!t.fixed&&t.fixed,width:t.width?t.width:""},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.status?n("el-tag",{attrs:{type:"success"}},[e._v("正常")]):n("el-tag",{attrs:{type:"danger"}},[e._v("停用")])]}}],null,!0)}):e._e()]})),e.canEdit||e.canDelete?n("el-table-column",{attrs:{label:"操作",fixed:"right",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.operate,(function(i,a){return n("el-button",{key:a,attrs:{type:i.type,plain:"",size:"mini"},nativeOn:{click:function(n){return n.preventDefault(),n.stopPropagation(),e.buttonMethods(i.func,t.$index,t.row)}}},[e._v(e._s(i.name))])}))}}],null,!1,3794201391)}):e._e()],2),n("el-dialog",{attrs:{title:e.dialogTitle,width:"800px",visible:e.showDialog,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.showDialog=t},close:e.resetForm}},[n("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.syncLoading,expression:"syncLoading"}],ref:"form",attrs:{model:e.temp,"label-width":"120px",rules:e.rules}},[n("el-form-item",{directives:[{name:"show",rawName:"v-show",value:0!=e.temp.id,expression:"temp.id != 0"}],attrs:{label:"ID",prop:"id"}},[n("el-col",{attrs:{span:11}},[n("el-input",{attrs:{value:this.temp.id,disabled:""}})],1)],1),n("el-form-item",{attrs:{label:"位置",prop:"location"}},[n("el-col",{attrs:{span:24}},[n("el-input",{model:{value:e.temp.location,callback:function(t){e.$set(e.temp,"location",t)},expression:"temp.location"}})],1)],1)],1),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{round:""},on:{click:function(t){e.showDialog=!1}}},[e._v("取 消")]),n("el-button",{attrs:{type:"primary",round:""},on:{click:function(t){0==e.temp.id?e.confirmAdd():e.confirmEdit()}}},[e._v("保 存")])],1)],1),e.searchKeyword?e._e():n("div",{staticClass:"pagination"},[n("el-pagination",{attrs:{"current-page":this.currentPage,"page-sizes":[10,20,30,50],"page-size":this.pageCount,layout:"total, sizes, prev, pager, next, jumper",total:this.total_nums},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)])},a=[],r=n("a34a"),o=n.n(r),s=n("63b8"),l=n("7f70"),c=n("d91d");n("f121");function u(e,t,n,i,a,r,o){try{var s=e[r](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(i,a)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var r=e.apply(t,n);function o(e){u(r,i,a,o,s,"next",e)}function s(e){u(r,i,a,o,s,"throw",e)}o(void 0)}))}}var h={components:{LinSearch:s["default"]},data:function(){return{tableData:[],loading:!1,Hidden:!0,searchKeyword:"",checkList:[],filterTableColumn:[],refreshPagination:!0,currentPage:1,pageCount:50,total_nums:0,dialogTableVisible:!1,fixedLeftList:[],fixedRightList:[],value:"",editRow:0,showTooltip:!0,syncLoading:!1,catList:[],options:[],optionsValue:[1],status:{0:"下架",1:"展示中",99:"已删除"},dialogTitle:"",showDialog:!1,temp:{id:0,location:null},nfc:null,nfc_options:[],loadingNFC:!1,transfer_data:[],filterMethod:function(e,t){return t.pinyin.indexOf(e)>-1},rules:{location:[{required:!0,message:"位置不能為空",trigger:"blur"}]},showDeleteDialog:!1,showImportDialog:!1,depts:[],roles:[],sites:[],filter_role:"",filter_roles:[{id:"",role_name:"所有角色",role_desc:""}]}},computed:{canAdd:function(){return-1!=this.$store.state.permissions.indexOf("add_location")},canEdit:function(){return-1!=this.$store.state.permissions.indexOf("edit_location")},canDelete:function(){return-1!=this.$store.state.permissions.indexOf("delete_location")},deptNameFmt:function(){return function(e){return null!=e.dept_desc&&""!=e.dept_desc?e.dept_name+" ("+e.dept_desc+")":e.dept_name}}},created:function(){var e=this;this.getList(this.cat,this.currentPage,this.pageCount),this.tableColumn=l["tableColumn"],this.operate=[],this.canEdit&&this.operate.push({name:"修改",func:"handleEdit",type:"primary"}),this.canDelete&&this.operate.push({name:"刪除",func:"handleDelete",type:"danger"}),this.tempCheckList=l["tableColumn"].map((function(e){return e.label})).slice(),this.checkList=l["tableColumn"].map((function(e){return e.label})),this.filterTableColumn=l["tableColumn"].filter((function(t){return e.checkList.indexOf(t.label)>-1})),console.log(this.filterTableColumn)},methods:{getList:function(){var e=d(o.a.mark((function e(t,n,i){var a,r;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loading=!0,a=this.searchKeyword,e.next=4,c["LocationModel"].getList({cat:t,start:n,count:i,keyword:a});case 4:r=e.sent,this.tableData=r.data,this.currentPage=r.currentPage,this.total_nums=parseInt(r.total),this.loading=!1;case 9:case"end":return e.stop()}}),e,this)})));function t(t,n,i){return e.apply(this,arguments)}return t}(),rowClick:function(e){console.log(e)},filterRoleChange:function(e){console.log(e),this.getList(this.cat,this.currentPage,this.pageCount)},handleChange:function(){var e=this;this.filterTableColumn=l["tableColumn"].filter((function(t){return e.checkList.indexOf(t.label)>-1}))},showRowOperateModal:function(){},handleSort:function(e,t){console.log("rowData",t),this.$message({type:"success",message:"排序已更改为:".concat(e)})},handleRecommend:function(e,t){var n=this;this.loading=!0,console.log(e,t),e?setTimeout((function(){n.loading=!1,n.$message({type:"success",message:"推荐成功"})}),1e3):setTimeout((function(){n.loading=!1,n.$message({type:"success",message:"取消推荐"})}),1e3)},handleCellEdit:function(e){e.editFlag=!0,this.$set(this.filterTableColumn[7],"width",200),this.tempEditRemark=e.remark,this.editRow++},handleCellSave:function(e){var t=this;e.editFlag=!1,setTimeout((function(){t.editRow--,t.$message({type:"success",message:"修改成功"})}),1e3)},handleCellCancel:function(e){e.editFlag=!1,console.log(this.tempEditRemark),e.remark=this.tempEditRemark,this.editRow--},handleSizeChange:function(e){var t=this;console.log("每页 ".concat(e," 条")),this.pageCount=e,this.loading=!0,setTimeout((function(){t.getList(t.cat,t.currentPage,t.pageCount),t.loading=!1}),1e3)},handleCurrentChange:function(){var e=d(o.a.mark((function e(t){var n=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.currentPage=t,this.loading=!0,setTimeout((function(){n.getList(n.cat,n.currentPage,n.pageCount),n.loading=!1}),1e3);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),buttonMethods:function(e,t,n){var i=this,a=this.$options.methods;a[e](i,t,n)},beforeCloseImportDialog:function(){this.showImportDialog=!1},handleImport:function(){var e=d(o.a.mark((function e(t){var n,i;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(t),null!=t){e.next=5;break}this.$message.error("文件解析出錯"),e.next=20;break;case 5:if(t=t.map((function(e){var t=new Object;return t.group_name=e.Name,t.remark=e.Remark,t})),0!=t.length){e.next=10;break}this.$message.error("導入失敗,數據表為空"),e.next=20;break;case 10:return n=this.$loading({lock:!0,text:"正在導入,請稍候...",background:"rgba(255,255,255, 0.8)"}),e.next=13,GroupModel.import(this.temp.server_id,t);case 13:i=e.sent,console.log(i),0==i.rc?this.$confirm("其中"+i.data.success.length+"項導入成功,"+i.data.error.length+"項導入失敗,"+i.data.duplicate.length+"項因已存在已被忽略","處理完成",{confirmButtonText:"確定",showCancelButton:!1,type:"success"}):this.$message.error(i.msg),n.close(),this.showImportDialog=!1,this.currentPage=1,this.getList(this.cat,this.currentPage,this.pageCount);case 20:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),handleEdit:function(e,t,n,i){console.log("handleEdit =>".concat(t),n),e.temp.id=n.id,e.temp.location=n.location,e.dialogTitle="修改位置",e.showDialog=!0},handAdd:function(){this.temp.id=0,this.temp.location="",this.dialogTitle="添加位置",this.showDialog=!0},confirmAdd:function(){var e=d(o.a.mark((function e(){var t=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=d(o.a.mark((function e(n){var i;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n){e.next=14;break}return t.syncLoading=!0,e.next=4,c["LocationModel"].setLocation("add",t.temp);case 4:if(i=e.sent,t.syncLoading=!1,0!==i.rc){e.next=13;break}return t.showDialog=!1,t.$message.success(i.msg),e.next=11,t.getList(t.cat,t.currentPage,t.pageCount);case 11:e.next=14;break;case 13:t.$message.error(i.msg);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleDelete:function(e,t,n){e.$confirm("此操作將永久刪除該記錄,是否繼續?","提示",{confirmButtonText:"確定",cancelButtonText:"取消",type:"warning"}).then(d(o.a.mark((function t(){var i;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,c["LocationModel"].setLocation("delete",n);case 3:if(i=t.sent,0!==i.rc){t.next=11;break}return e.loading=!1,e.$message.success(i.msg),t.next=9,e.getList(e.cat,e.currentPage,e.pageCount);case 9:t.next=13;break;case 11:e.loading=!1,e.$message.error(i.msg);case 13:case"end":return t.stop()}}),t)}))))},confirmEdit:function(){var e=d(o.a.mark((function e(){var t=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=d(o.a.mark((function e(n){var i;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n){e.next=14;break}return t.syncLoading=!0,e.next=4,c["LocationModel"].setLocation("update",t.temp);case 4:if(i=e.sent,t.syncLoading=!1,0!==i.rc){e.next=13;break}return t.showDialog=!1,t.$message.success(i.msg),e.next=11,t.getList(t.cat,t.currentPage,t.pageCount);case 11:e.next=14;break;case 13:t.$message.error(i.msg);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),filterNfcChange:function(e){this.temp.nfc_code=e},onQueryChange:function(e){this.searchKeyword=e.trim(),this.currentPage=1,this.getList(this.cat,this.currentPage,this.pageCount)},handleChangeOptions:function(e){this.optionsValue=e;var t=e[e.length-1];this.cat=t,this.total_nums=0,this.getList(this.cat,this.currentPage,this.pageCount)},_generateOptionsData:function(e){var t=[];return e.forEach((function(e){0!=e.pid||t.push({value:e.id,label:e.title,children:[]})})),t.forEach((function(n,i){var a=[];e.forEach((function(e){e.pid===n.value&&a.push({value:e.id,label:e.title,disabled:!e.status})})),t[i].children=a})),t},resetForm:function(){this.$refs.form.resetFields(),this.optionsValue=[]}},watch:{"temp.file":{handler:function(){this.temp.title=decodeURI(this.temp.file).replace(/%2F/g,"/")}},fixedLeftList:function(){var e=this;this.filterTableColumn.map((function(t,n){return e.fixedLeftList.indexOf(t.label)>-1?e.$set(e.filterTableColumn[n],"fixed","left"):-1===e.fixedRightList.indexOf(t.label)&&e.$set(e.filterTableColumn[n],"fixed",!1),""})),console.log(this.filterTableColumn)},fixedRightList:function(){var e=this;this.filterTableColumn.map((function(t,n){return e.fixedRightList.indexOf(t.label)>-1?e.$set(e.filterTableColumn[n],"fixed","right"):-1===e.fixedLeftList.indexOf(t.label)&&e.$set(e.filterTableColumn[n],"fixed",!1),""})),console.log(this.filterTableColumn)},editRow:function(){return this.filterTableColumn[7]&&0===this.editRow&&this.$set(this.filterTableColumn[7],"width",200),""}}},f=h,p=(n("0bf4"),n("2877")),g=Object(p["a"])(f,i,a,!1,null,"46afe20f",null);t["default"]=g.exports},"2d22":function(e,t,n){},"58df":function(e,t,n){"use strict";var i=n("e9da"),a=n.n(i);a.a},"63b8":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-search"},[n("el-input",{staticClass:"input-with-select",attrs:{size:"medium",placeholder:e.placeholder,clearable:""},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},slot:"append"})],1)],1)},a=[],r=n("0a2a"),o={props:{placeholder:{type:String,default:"请输入内容"}},data:function(){return{keyword:""}},created:function(){var e=this;this.$watch("keyword",r["default"].debounce((function(t){e.$emit("query",t)}),1e3))},methods:{clear:function(){this.keyword=""}}},s=o,l=(n("58df"),n("2877")),c=Object(l["a"])(s,i,a,!1,null,"18aca186",null);t["default"]=c.exports},"7f70":function(e,t,n){"use strict";n.r(t),n.d(t,"tableColumn",(function(){return i}));var i=[{prop:"id",label:"ID",width:70},{prop:"location",label:"位置"},{prop:"created",label:"添加時間",width:160},{prop:"updated",label:"更新時間",width:160}]},d91d:function(e,t,n){"use strict";n.r(t),n.d(t,"LocationModel",(function(){return p}));var i=n("a34a"),a=n.n(i),r=n("ceda");n("4360");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(n,!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t,n,i,a,r,o){try{var s=e[r](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(i,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var r=e.apply(t,n);function o(e){c(r,i,a,o,s,"next",e)}function s(e){c(r,i,a,o,s,"throw",e)}o(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function f(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}var p=function(){function e(){d(this,e)}return f(e,null,[{key:"getList",value:function(){var e=u(a.a.mark((function e(t){var n;return a.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=new Object,e.prev=1,e.next=4,Object(r["post"])("/api-data",{c:"Location",a:"getList",pageLimit:t.count,cpage:t.start,keyword:t.keyword}).then((function(e){n=e})).catch((function(e){console.log(null==e?"網絡出錯":e),console.log("網絡出錯123")}));case 4:e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),console.log("網絡出錯");case 10:return e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,null,[[1,7]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setLocation",value:function(){var e=u(a.a.mark((function e(t,n){var i;return a.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=new Object,e.prev=1,e.next=4,Object(r["post"])("/api-data",s({c:"Location",a:t},n)).then((function(e){i=e})).catch((function(e){console.log(null==e?"網絡出錯":e)}));case 4:e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),console.log("網絡出錯");case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e,null,[[1,7]])})));function t(t,n){return e.apply(this,arguments)}return t}()}]),e}()},e9da:function(e,t,n){}}]);