更新
1、添加前端强制完成按钮
2、修改字典数据缓存问题
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "ä»»å¡å®æ", |
| | | name: "ä»»å¡å¼ºå¶å®æ", |
| | | icon: '', |
| | | class: '', |
| | | value: 'TaskCompleted', |
| | |
| | | onInit() { |
| | | // this.$Notice.success({ title: this.detailOptions.cnName + ',æ¥è¯¢ç»æ', desc: 'è¿åç对象ï¼' + JSON.stringify(data) }); |
| | | |
| | | var forceCompleteTaskButton = this.buttons.find((x) => x.value == "TaskCompleted"); |
| | | if (forceCompleteTaskButton) { |
| | | forceCompleteTaskButton.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0 || rows.length > 1) return this.$error("è¯·éæ©ä¸è¡æ°æ®"); |
| | | this.http |
| | | .post("/api/Task/ForceCompleteTask?taskNum=" + rows[0].TaskNum, {}, true) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.options = x.data; |
| | | console.log(this.options); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | var previousButton = this.buttons.find((x) => x.value == "Previous"); |
| | | if (previousButton) previousButton.hidden = true; |
| | | var nextButton = this.buttons.find((x) => x.value == "Next"); |
| | |
| | | required: true, |
| | | field: "locationType", |
| | | type: "select", |
| | | dataKey:"", |
| | | data:[ |
| | | {key:1,value:'æ£å¸¸è´§ä½'}, |
| | | {key:2,value:'æåä½'}, |
| | | {key:3,value:'æåæº'}, |
| | | {key:4,value:'è¾é线'}, |
| | | {key:5,value:'ç»ç«æº'}, |
| | | ] |
| | | dataKey: "locationTypeEnum", |
| | | data: [], |
| | | }, |
| | | { |
| | | { |
| | | title: "ç¦ç¨ç¶æ", |
| | | required: true, |
| | | field: "enableStatus", |
| | | type: "select", |
| | | dataKey:"", |
| | | data:[ |
| | | {key:0,value:'æ£å¸¸'}, |
| | | {key:1,value:'ç¦ç¨'}, |
| | | ] |
| | | dataKey: "enableStatusEnum", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åºå主é®", |
| | | required: true, |
| | | field: "areaId", |
| | | type: "string", |
| | | hidden:true, |
| | | hidden: true, |
| | | }, |
| | | // { |
| | | // title: "å··éç¼å·", |
| | |
| | | dataKey: "locationTypeEnum", |
| | | data: [], |
| | | }, |
| | | { |
| | | { |
| | | title: "è´§ä½ç¶æ", |
| | | field: "locationStatus", |
| | | type: "selectList", |
| | |
| | | title: "åºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | hidden:true, |
| | | hidden: true, |
| | | align: "left", |
| | | bind: { |
| | | key: "areainfo", |
| | | data: [] |
| | | } |
| | | data: [], |
| | | }, |
| | | }, |
| | | { |
| | | field: "locationCode", |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind:{key: "locationTypeEnum", data: []} |
| | | bind: { key: "locationTypeEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "locationStatus", |
| | |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "deviceName", |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | sort: true |
| | | }, |
| | | { |
| | | field: "deviceProDataBlock", |
| | |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *ä¸å¡è¯·å¨@/extension/system/Sys_Log.jsæ¤å¤ç¼å |
| | | --> |
| | | <template> |
| | | <view-grid ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend"> |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/system/Sys_Log.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'Id', |
| | | footer: "Foots", |
| | | cnName: 'ç³»ç»æ¥å¿', |
| | | name: 'Sys_Log', |
| | | url: "/Sys_Log/", |
| | | sortName: "Id" |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({"BeginDate":"","Url":"","LogType":[],"Success":[],"UserIP":"","ServiceIP":"","Role_Id":""}); |
| | | const searchFormOptions = ref([[{"title":"请æ±å°å","field":"Url","type":"text"},{"title":"ç¨æ·IP","field":"UserIP","type":"text"},{"title":"æå¡å¨IP","field":"ServiceIP","type":"text"}],[{"title":"å¼å§æ¶é´","field":"BeginDate","type":"datetime"},{"dataKey":"restatus","data":[],"title":"ååºç¶æ","field":"Success","type":"selectList"},{"dataKey":"roles","data":[],"title":"è§è²ID","field":"Role_Id","type":"select"}],[{"dataKey":"log","data":[],"title":"æ¥å¿ç±»å","field":"LogType","colSize":12,"type":"checkbox"}]]); |
| | | const columns = ref([{field:'Id',title:'Id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'}, |
| | | {field:'BeginDate',title:'å¼å§æ¶é´',type:'datetime',width:140,align:'left',sortable:true}, |
| | | {field:'UserName',title:'ç¨æ·åç§°',type:'string',width:90,align:'left'}, |
| | | {field:'Url',title:'请æ±å°å',type:'string',width:110,align:'left'}, |
| | | {field:'LogType',title:'æ¥å¿ç±»å',type:'string',bind:{ key:'log',data:[]},width:80,align:'left'}, |
| | | {field:'Success',title:'ååºç¶æ',type:'int',bind:{ key:'restatus',data:[]},width:80,align:'left'}, |
| | | {field:'ElapsedTime',title:'æ¶é¿',type:'int',width:60,align:'left'}, |
| | | {field:'RequestParameter',title:'请æ±åæ°',type:'string',width:70,align:'left'}, |
| | | {field:'ResponseParameter',title:'ååºåæ°',type:'string',width:70,align:'left'}, |
| | | {field:'ExceptionInfo',title:'å¼å¸¸ä¿¡æ¯',type:'string',width:70,align:'left'}, |
| | | {field:'UserIP',title:'ç¨æ·IP',type:'string',width:90,align:'left'}, |
| | | {field:'ServiceIP',title:'æå¡å¨IP',type:'string',width:90,hidden:true,align:'left'}, |
| | | {field:'BrowserType',title:'æµè§å¨ç±»å',type:'string',width:90,align:'left'}, |
| | | {field:'User_Id',title:'ç¨æ·ID',type:'int',width:90,hidden:true,align:'left'}, |
| | | {field:'Role_Id',title:'è§è²ID',type:'int',bind:{ key:'roles',data:[]},width:90,hidden:true,align:'left'}, |
| | | {field:'EndDate',title:'ç»ææ¶é´',type:'datetime',width:150,hidden:true,align:'left',sortable:true}]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "" |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/system/Sys_Log.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "Id", |
| | | footer: "Foots", |
| | | cnName: "ç³»ç»æ¥å¿", |
| | | name: "Sys_Log", |
| | | url: "/Sys_Log/", |
| | | sortName: "Id", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | BeginDate: "", |
| | | Url: "", |
| | | LogType: [], |
| | | Success: [], |
| | | UserIP: "", |
| | | ServiceIP: "", |
| | | Role_Id: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "请æ±å°å", field: "url", type: "like" }, |
| | | { title: "ç¨æ·IP", field: "userIP", type: "like" }, |
| | | { title: "å¼å§æ¶é´", field: "beginDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | }); |
| | | </script> |
| | | { |
| | | field: "beginDate", |
| | | title: "å¼å§æ¶é´", |
| | | type: "datetime", |
| | | width: 140, |
| | | align: "left", |
| | | sortable: true, |
| | | }, |
| | | { |
| | | field: "endDate", |
| | | title: "ç»ææ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | hidden: true, |
| | | align: "left", |
| | | sortable: true, |
| | | }, |
| | | { |
| | | field: "elapsedTime", |
| | | title: "æ¶é¿", |
| | | type: "int", |
| | | width: 60, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "userName", |
| | | title: "ç¨æ·åç§°", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "url", |
| | | title: "请æ±å°å", |
| | | type: "string", |
| | | width: 110, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "success", |
| | | title: "ååºç¶æ", |
| | | type: "int", |
| | | bind: { key: "restatus", data: [] }, |
| | | width: 80, |
| | | align: "left", |
| | | hidden: true |
| | | }, |
| | | { |
| | | field: "requestParam", |
| | | title: "请æ±åæ°", |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "responseParam", |
| | | title: "ååºåæ°", |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "userIP", |
| | | title: "ç¨æ·IP", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "userId", |
| | | title: "ç¨æ·ID", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | |
| | | |
| | | public string Config { get; set; } |
| | | |
| | | public object Data { get; set; } |
| | | public object Data { get; set; } |
| | | |
| | | public bool SaveCache { get; set; } = true; |
| | | } |
| | | } |
| | |
| | | if (vueDictionaryDTO != null) |
| | | { |
| | | vueDictionaryDTOs.Add(vueDictionaryDTO); |
| | | if (!_cacheService.Exists(item)) |
| | | if (!_cacheService.Exists(item) && vueDictionaryDTO.SaveCache) |
| | | { |
| | | _cacheService.Add(item, vueDictionaryDTO.Serialize()); |
| | | } |
| | |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |
| | | //è¿æ¥å符串 |
| | | |
| | | "ConnectionString": "Data Source=10.0.250.20;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=STC@123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=10.0.250.20;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=STC@123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEAWCS_GUODIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //è·¨å |
| | | "Cors": { |
| | | "PolicyName": "CorsIpAccess", //çç¥åç§° |
| | |
| | | { |
| | | Config = v.Config, |
| | | DicNo = v.DicNo, |
| | | Data = BaseDal.QueryDynamicDataBySql(v.DBSql) |
| | | Data = BaseDal.QueryDynamicDataBySql(v.DBSql), |
| | | SaveCache = false, |
| | | }); |
| | | } |
| | | } |
| | | |
| | | foreach (var item in selectDics) |
| | | { |
| | | if (!_cacheService.Exists(item.DicNo)) |
| | | if (!_cacheService.Exists(item.DicNo) && item.SaveCache) |
| | | { |
| | | _cacheService.Add(item.DicNo, item.Serialize()); |
| | | } |