diff --git a/src/api/model/common.js b/src/api/model/common.js index 61012f7d..1f036a7c 100644 --- a/src/api/model/common.js +++ b/src/api/model/common.js @@ -16,30 +16,9 @@ export default { return await http.post(this.url, data, config); } }, - exportFile: { - url: `${config.API_URL}/fileExport`, - name: "导出附件", - get: async function(data, config={}){ - return await http.get(this.url, data, config); - } - }, - importFile: { - url: `${config.API_URL}/fileImport`, - name: "导入附件", - post: async function(data, config={}){ - return await http.post(this.url, data, config); - } - }, file: { - menu: { - url: `${config.API_URL}/file/menu`, - name: "获取文件分类", - get: async function(){ - return await http.get(this.url); - } - }, list: { - url: `${config.API_URL}/file/list`, + url: `${config.API_URL}/file`, name: "获取文件列表", get: async function(params){ return await http.get(this.url, params); diff --git a/src/api/model/rpm.js b/src/api/model/rpm.js index 6e00bbd4..10f1ac89 100644 --- a/src/api/model/rpm.js +++ b/src/api/model/rpm.js @@ -133,6 +133,14 @@ export default { ); } }, + item: { + name: "获取", + req: async function (id) { + return await http.get( + `${config.API_URL}/rpm/rpj/${id}/`, + ); + } + }, read:{ name: "详情", req: async function (id) { @@ -241,4 +249,4 @@ export default { } }, -} \ No newline at end of file +} diff --git a/src/components/scSelect/userselect.vue b/src/components/scSelect/userselect.vue index ab905acc..4d4f2905 100644 --- a/src/components/scSelect/userselect.vue +++ b/src/components/scSelect/userselect.vue @@ -125,11 +125,6 @@ name: "employee", components: {}, props: { - value: { - // 接受外部v-model传入的值 - type: [String], - default: "", - }, user: { // 接受外部v-model传入的值 type: [String], @@ -163,8 +158,13 @@ this.getUser(); this.getDept(); this.getPost(); - - + debugger; + if(this.user===""){ + this.selection = []; + this.apiObj.map(item => { + this.$refs.table.toggleRowSelection(item, false) + }) + } }, watch: { filterText(val) { @@ -181,13 +181,25 @@ }, methods: { showDialog() { - this.dialoguser = true; - this.$nextTick(function () { - this.apiObj.map(item => { - if (item.id === this.user) { - this.$refs.table.toggleRowSelection(item, true) - } - }) + debugger; + let that = this; + that.dialoguser = true; + that.$nextTick(function () { + debugger; + if(that.user===""){ + that.selection = []; + that.apiObj.map(item => { + that.$refs.table.toggleRowSelection(item, false) + }) + }else{ + that.apiObj.map(item => { + debugger; + if (item.id === that.user) { + that.$refs.table.toggleRowSelection(item, true) + } + }) + } + }) }, @@ -240,16 +252,19 @@ }, //表格选择后回调事件 selectionChange(selection) { + debugger; if (selection.length > 1) { let del_row = selection.shift(); this.selection = selection[1]; this.$refs.userTable.toggleRowSelection(del_row, false); // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中) }else{ + debugger; this.selection = selection; } }, submitfrom() { + debugger; if(this.selection.length===1){ let obj={id:this.selection[0].id,name:this.selection[0].name}; this.$emit("handlerSubmit", obj); diff --git a/src/components/scWorkflow/nodes/branch.vue b/src/components/scWorkflow/nodes/branch.vue index 9da0b4aa..c6b05d6c 100644 --- a/src/components/scWorkflow/nodes/branch.vue +++ b/src/components/scWorkflow/nodes/branch.vue @@ -2,7 +2,7 @@
- 添加条件 +
diff --git a/src/config/route.js b/src/config/route.js index 73de51ea..709290d3 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -690,6 +690,15 @@ const routes = [ "icon": "el-icon-fold", }, "component": "ops/thirdLogs" + }, + { + "name": "files", + "path": "/ops/files", + "meta": { + "title": "文件日志", + "icon": "el-icon-fold", + }, + "component": "ops/files" }, ] }, diff --git a/src/router/index.js b/src/router/index.js index a7be01ee..ee0ec1cf 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -67,18 +67,21 @@ router.beforeEach(async (to, from, next) => { //加载动态/静态路由 if(!isGetRouter){ // let apiMenu = tool.data.get("MENU") || [] - let userInfo = tool.data.get("USER_INFO") + debugger; + let userInfo = tool.data.get("USER_INFO"); + let permissions = tool.data.get("PERMISSIONS"); let userMenu = treeFilter(userRoutes, node => { return node.meta.perms ? node.meta.perms.filter(item=>userInfo.perms.indexOf(item)>-1).length > 0 : true - }) + }); // let menu = [...userMenu, ...apiMenu] - var menuRouter = filterAsyncRouter(userMenu) - menuRouter = flatAsyncRoutes(menuRouter) + var menuRouter = filterAsyncRouter(userMenu); + menuRouter = flatAsyncRoutes(menuRouter); menuRouter.forEach(item => { router.addRoute("layout", item) - }) - routes_404_r = router.addRoute(routes_404) - if (to.matched.length == 0) { + }); + routes_404_r = router.addRoute(routes_404); + debugger; + if (to.matched.length ==0||permissions[0]==='superuser') { router.push(to.fullPath); } isGetRouter = true; diff --git a/src/utils/tool.js b/src/utils/tool.js index 8c027dbc..d8672e85 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -147,7 +147,7 @@ tool.objCopy = function (obj) { /* 日期格式化 */ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') { - date = new Date(date) + date = new Date(date); var o = { "M+" : date.getMonth()+1, //月份 "d+" : date.getDate(), //日 @@ -155,14 +155,21 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') { "m+" : date.getMinutes(), //分 "s+" : date.getSeconds(), //秒 "q+" : Math.floor((date.getMonth()+3)/3), //季度 - "S" : date.getMilliseconds() //毫秒 + "S" : date.getMilliseconds(), //毫秒 + "W" : date.getDay(), //毫秒 }; - if(/(y+)/.test(fmt)) { - fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); - } - for(var k in o) { - if(new RegExp("("+ k +")").test(fmt)){ - fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); + var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"); + + if(fmt==='week'){ + fmt =weeks[o.w]; + }else{ + if(/(y+)/.test(fmt)) { + fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); + } + for(var k in o) { + if(new RegExp("("+ k +")").test(fmt)){ + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); + } } } return fmt; diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index edf98210..fd9a27cd 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -5,9 +5,9 @@
曲阳金隅智慧安全
- 2022-06-22 + {{ currentDay }} 周三下午 - 17:59:52 + {{ currentTime }}
@@ -831,6 +831,8 @@ LBType: '1', userMarker: {}, todayDate:'', + currentDay:'', + currentTime:'', } }, created() { @@ -841,7 +843,12 @@ }, mounted() { let date = new Date(); - this.todayDate = this.warningData.params.start_create = this.cateAggForm.start_create =date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate(); + this.timeNow = date.getDay(); + this.todayDate = this.warningData.params.start_create = this.cateAggForm.start_create =this.$TOOL.dateFormat(new Date(), 'yyyy-MM-dd'); + this.showTime(); + setInterval(()=>{ + this.showTime(); + },1000); window.map = new jsmap.JSMap({ mapType: jsmap.JSMapType.MAP_3D, container: 'mapContainer', @@ -1016,6 +1023,10 @@ setInterval(function () {}, 3000) }, methods: { + showTime(){ + this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss'); + this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日') + }, getWarningTotal(){ let that = this; that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res=>{ diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue index 48af8fc5..2e2dd9ce 100644 --- a/src/views/login/components/passwordForm.vue +++ b/src/views/login/components/passwordForm.vue @@ -159,7 +159,7 @@ export default { try { var res1 = await this.$API.auth.info.get(); this.$TOOL.data.set("USER_INFO", res1); - this.$TOOL.data.set("PERMISSIONS", res1.perms.keys()); + this.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms)); this.$router.replace({ path: "/", }); diff --git a/src/views/ops/files.vue b/src/views/ops/files.vue new file mode 100644 index 00000000..8d4487ff --- /dev/null +++ b/src/views/ops/files.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/views/ops/log_request.vue b/src/views/ops/log_request.vue index f37af7e1..5f89bc5a 100644 --- a/src/views/ops/log_request.vue +++ b/src/views/ops/log_request.vue @@ -11,11 +11,12 @@ - - + - + + + - +