From 536f22584d31f5ca648040d6a15676f0869b84db Mon Sep 17 00:00:00 2001 From: guanj Date: Tue, 30 Jun 2026 08:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/luckysheet/luckysheet.umd.js | 52 +- src/api/system-boot/csDictData.ts | 2 +- src/api/systerm.ts | 14 + src/components/cockpit/F47Curve/index.vue | 4 - src/components/cockpit/ITICurve/index.vue | 4 - .../components/overLimitDetails.vue | 1 - .../components/overLimitDetails.vue | 1 - .../listOfMainMonitoringPoints/index.vue | 175 +- .../cockpit/monitoringPointList/index.vue | 20 +- .../cockpit/sensitiveLoad/index.vue | 1 - src/components/echarts/MyEchart.vue | 21 +- src/components/echarts/rmsboxi.vue | 59 +- src/components/echarts/shuWorker.js | 1 - src/components/echarts/shushiboxi.vue | 61 +- src/components/table/fieldRender/index.vue | 10 +- src/components/tree/device.vue | 193 +- src/components/tree/govern/deviceTreeUtils.ts | 14 +- src/components/tree/govern/lineTreeUtils.ts | 30 +- src/components/tree/govern/pointTree.vue | 25 +- src/components/tree/govern/selectTree.vue | 24 +- src/components/tree/index.vue | 3 +- src/components/tree/point.vue | 274 +- src/components/tree/select.vue | 10 +- .../admin/components/popup/password.vue | 26 +- src/styles/element.scss | 17 +- src/template/dialog.vue | 5 +- src/utils/iconfont.ts | 1 - src/utils/request.ts | 9 +- src/views/auth/menu/api.vue | 1 - src/views/auth/menu/popupApi.vue | 40 +- src/views/auth/menu/popupMenu.vue | 8 +- src/views/auth/role/popupForm.vue | 5 +- src/views/auth/userList/index.vue | 1 - src/views/auth/userList/popupEdit.vue | 9 +- src/views/auth/userList/popupPwd.vue | 6 +- src/views/govern/alarm/Transient.vue | 5 +- src/views/govern/alarm/alarmConfig/form.vue | 9 +- src/views/govern/alarm/multiCondition.vue | 2 +- src/views/govern/alarm/scopeConfig/form.vue | 30 +- .../govern/alarm/steadyStateEvent/index.vue | 13 +- src/views/govern/analyze/APF/APF.vue | 1 - src/views/govern/analyze/DVR/index.vue | 10 +- .../components/monitoring.vue | 70 +- .../device/control/analysisList/popup.vue | 4 +- src/views/govern/device/control/index.vue | 11 +- .../govern/device/control/moduleData.vue | 7 +- .../supplementaryRecruitment/history.vue | 11 +- .../govern/device/control/tabs/event.vue | 6 + .../device/control/tabs/operatingTrend.vue | 17 + .../govern/device/control/tabs/trend.vue | 8 +- .../govern/device/control/testItemRecords.vue | 7 +- src/views/govern/device/disposition/index.vue | 9 +- src/views/govern/device/fileService/index.vue | 8 +- src/views/govern/device/fileService/popup.vue | 1 - src/views/govern/device/manage/popup.vue | 4 +- .../govern/device/officialUser/index.vue | 10 +- .../device/planData/components/popup.vue | 4 +- .../device/planData/components/transient.vue | 17 +- src/views/govern/device/planData/index.vue | 2359 +++++++++-------- src/views/govern/device/tourist/index.vue | 1 - .../govern/manage/basic/popupDictionary.vue | 5 +- .../govern/manage/basic/popupVersion.vue | 6 +- src/views/govern/manage/basic/template.vue | 2 +- .../govern/manage/components/factoryForm.vue | 19 +- src/views/govern/manage/engineering.vue | 49 +- .../manage/engineering/components/itemAdd.vue | 21 +- .../manage/engineering/components/popup.vue | 8 +- src/views/govern/manage/engineering/index.vue | 518 ++-- src/views/govern/manage/gplot/popupEdit.vue | 7 +- .../manage/programVersion/comp/upgrade.vue | 2 +- .../govern/monitorRecall/eventRecall.vue | 123 +- src/views/govern/monitorRecall/index.vue | 69 +- src/views/govern/monitorRecall/log.vue | 193 ++ .../govern/monitorRecall/steadyRecall.vue | 125 +- .../mxgraph/graphList/components/popup.vue | 12 +- src/views/govern/reportForms/PopupForm.vue | 5 +- src/views/govern/reportForms/department.vue | 182 +- src/views/govern/reportForms/form.vue | 4 +- src/views/govern/reportForms/look.vue | 4 +- src/views/govern/reportForms/luckysheet.vue | 16 +- .../sensitiveLoadMange/component/bind.vue | 2 +- .../sensitiveLoadMange/component/bindForm.vue | 9 +- .../govern/sensitiveLoadMange/detail.vue | 6 +- .../govern/setting/frontManagement/index.vue | 23 +- .../govern/setting/statisticalType/add.vue | 8 +- .../setting/statisticalType/binding.vue | 6 +- .../govern/terminal/deviceLedger/index.vue | 11 +- .../govern/terminal/deviceMonitor/index.vue | 16 +- src/views/pqs/cockpit/realTimeData/index.vue | 2 +- .../pqs/cockpit/setUp/components/popup.vue | 3 - .../setting/dictionary/component/addTree.vue | 8 +- .../setting/dictionary/component/index.vue | 1 - src/views/setting/dictionary/list/index.vue | 2 +- .../dictionary/list/popupDetailEdit.vue | 5 +- .../setting/dictionary/list/popupEdit.vue | 5 +- src/views/setting/dictionary/tree/index.vue | 70 +- .../setting/dictionary/tree/popupForm.vue | 7 +- .../setting/dictionary/version/index.vue | 92 +- src/views/system/reportForms/department.vue | 185 +- src/views/system/reportForms/form.vue | 4 +- src/views/system/scheduledTasks/form.vue | 8 +- src/views/system/scheduledTasks/index.vue | 14 +- src/views/user/popupUpdatePwd.vue | 6 +- 103 files changed, 3220 insertions(+), 2394 deletions(-) create mode 100644 src/views/govern/monitorRecall/log.vue diff --git a/public/static/luckysheet/luckysheet.umd.js b/public/static/luckysheet/luckysheet.umd.js index a35a21e..03afb76 100644 --- a/public/static/luckysheet/luckysheet.umd.js +++ b/public/static/luckysheet/luckysheet.umd.js @@ -1,27 +1,27 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).luckysheet=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t,a){return e(a={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&a.path)}},a.exports),a.exports}var n=function(e){return e&&e.Math==Math&&e},l=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},s=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,h={f:d&&!u.call({1:2},1)?function(e){var t=d(this,e);return!!t&&t.enumerable}:u},m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},p={}.toString,f=function(e){return p.call(e).slice(8,-1)},g="".split,v=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==f(e)?g.call(e,""):Object(e)}:Object,y=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},b=function(e){return v(y(e))},k=function(e){return"object"==typeof e?null!==e:"function"==typeof e},x=function(e,t){if(!k(e))return e;var a,r;if(t&&"function"==typeof(a=e.toString)&&!k(r=a.call(e)))return r;if("function"==typeof(a=e.valueOf)&&!k(r=a.call(e)))return r;if(!t&&"function"==typeof(a=e.toString)&&!k(r=a.call(e)))return r;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,_=function(e,t){return w.call(e,t)},C=l.document,T=k(C)&&k(C.createElement),A=function(e){return T?C.createElement(e):{}},S=!s&&!o((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),I=Object.getOwnPropertyDescriptor,R={f:s?I:function(e,t){if(e=b(e),t=x(t,!0),S)try{return I(e,t)}catch(e){}if(_(e,t))return m(!h.f.call(e,t),e[t])}},q=function(e){if(!k(e))throw TypeError(String(e)+" is not an object");return e},D=Object.defineProperty,F={f:s?D:function(e,t,a){if(q(e),t=x(t,!0),q(a),S)try{return D(e,t,a)}catch(e){}if("get"in a||"set"in a)throw TypeError("Accessors not supported");return"value"in a&&(e[t]=a.value),e}},E=s?function(e,t,a){return F.f(e,t,m(1,a))}:function(e,t,a){return e[t]=a,e},M=function(e,t){try{E(l,e,t)}catch(a){l[e]=t}return t},N=l["__core-js_shared__"]||M("__core-js_shared__",{}),P=Function.toString;"function"!=typeof N.inspectSource&&(N.inspectSource=function(e){return P.call(e)});var z,L,O,B=N.inspectSource,V=l.WeakMap,H="function"==typeof V&&/native code/.test(B(V)),U=a((function(e){(e.exports=function(e,t){return N[e]||(N[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),j=0,G=Math.random(),W=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++j+G).toString(36)},Y=U("keys"),X=function(e){return Y[e]||(Y[e]=W(e))},K={},Z=l.WeakMap;if(H){var Q=new Z,J=Q.get,ee=Q.has,te=Q.set;z=function(e,t){return te.call(Q,e,t),t},L=function(e){return J.call(Q,e)||{}},O=function(e){return ee.call(Q,e)}}else{var ae=X("state");K[ae]=!0,z=function(e,t){return E(e,ae,t),t},L=function(e){return _(e,ae)?e[ae]:{}},O=function(e){return _(e,ae)}}var re={set:z,get:L,has:O,enforce:function(e){return O(e)?L(e):z(e,{})},getterFor:function(e){return function(t){var a;if(!k(t)||(a=L(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return a}}},ne=a((function(e){var t=re.get,a=re.enforce,r=String(String).split("String");(e.exports=function(e,t,n,i){var o=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||_(n,"name")||E(n,"name",t),a(n).source=r.join("string"==typeof t?t:"")),e!==l?(o?!c&&e[t]&&(s=!0):delete e[t],s?e[t]=n:E(e,t,n)):s?e[t]=n:M(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||B(this)}))})),le=l,ie=function(e){return"function"==typeof e?e:void 0},oe=function(e,t){return arguments.length<2?ie(le[e])||ie(l[e]):le[e]&&le[e][t]||l[e]&&l[e][t]},se=Math.ceil,ce=Math.floor,ue=function(e){return isNaN(e=+e)?0:(e>0?ce:se)(e)},de=Math.min,he=function(e){return e>0?de(ue(e),9007199254740991):0},me=Math.max,pe=Math.min,fe=function(e,t){var a=ue(e);return a<0?me(a+t,0):pe(a,t)},ge=function(e){return function(t,a,r){var n,l=b(t),i=he(l.length),o=fe(r,i);if(e&&a!=a){for(;i>o;)if((n=l[o++])!=n)return!0}else for(;i>o;o++)if((e||o in l)&&l[o]===a)return e||o||0;return!e&&-1}},ve={includes:ge(!0),indexOf:ge(!1)},ye=ve.indexOf,be=function(e,t){var a,r=b(e),n=0,l=[];for(a in r)!_(K,a)&&_(r,a)&&l.push(a);for(;t.length>n;)_(r,a=t[n++])&&(~ye(l,a)||l.push(a));return l},ke=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xe=ke.concat("length","prototype"),we={f:Object.getOwnPropertyNames||function(e){return be(e,xe)}},_e={f:Object.getOwnPropertySymbols},Ce=oe("Reflect","ownKeys")||function(e){var t=we.f(q(e)),a=_e.f;return a?t.concat(a(e)):t},Te=function(e,t){for(var a=Ce(t),r=F.f,n=R.f,l=0;l1?arguments[1]:void 0)}});var je,Ge=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,a={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(a,[]),t=a instanceof Array}catch(e){}return function(a,r){return q(a),function(e){if(!k(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(a,r):a.__proto__=r,a}}():void 0),We=function(e,t,a){var r,n;return Ge&&"function"==typeof(r=t.constructor)&&r!==a&&k(n=r.prototype)&&n!==a.prototype&&Ge(e,n),e},Ye=Object.keys||function(e){return be(e,ke)},Xe=s?Object.defineProperties:function(e,t){q(e);for(var a,r=Ye(t),n=r.length,l=0;n>l;)F.f(e,a=r[l++],t[a]);return e},Ke=oe("document","documentElement"),Ze=X("IE_PROTO"),Qe=function(){},Je=function(e){return" diff --git a/src/components/tree/select.vue b/src/components/tree/select.vue index 7d97935..92c7feb 100644 --- a/src/components/tree/select.vue +++ b/src/components/tree/select.vue @@ -71,7 +71,11 @@ const emit = defineEmits(['changePointType', 'checkedNodesChange']) const { proxy } = useCurrentInstance() const menuCollapse = ref(false) const filterText = ref('') -const defaultProps = { label: 'name', value: 'id' } +const defaultProps = { + label: 'name', + value: 'id', + class: (data: any) => (data.noCheckbox ? 'is-no-checkbox' : '') +} const filterNode = createTreeFilterNode() const checkedNodes = ref([]) const defaultCheckedKeys = ref([]) @@ -152,6 +156,10 @@ defineExpose({ treeRef }) background-color: var(--el-color-primary-light-7); } + :deep(.el-tree-node.is-no-checkbox > .el-tree-node__content .el-checkbox) { + display: none; + } + .menu-collapse { color: var(--el-color-primary); } diff --git a/src/layouts/admin/components/popup/password.vue b/src/layouts/admin/components/popup/password.vue index 888b6e4..b4ab20d 100644 --- a/src/layouts/admin/components/popup/password.vue +++ b/src/layouts/admin/components/popup/password.vue @@ -3,25 +3,23 @@ - + - + - + @@ -46,6 +44,7 @@ const form = reactive({ newPwd: '', confirmPwd: '' }) +const loading = ref(false) const rules = { password: [ { required: true, message: '请输入校验密码', trigger: 'blur' }, @@ -99,6 +98,7 @@ const open = () => { const submit = () => { formRef.value.validate(async (valid: boolean) => { if (valid) { + loading.value = true passwordConfirm(form.password).then(res => { updatePassword({ id: adminInfo.$state.userIndex, @@ -106,14 +106,18 @@ const submit = () => { }).then(async (res: any) => { ElMessage.success('密码修改成功') dialogVisible.value = false - + setTimeout(() => { - navTabs.closeTabs() + navTabs.closeTabs() window.localStorage.clear() adminInfo.reset() router.push({ name: 'login' }) }, 0) + }).finally(() => { + loading.value = false }) + }).finally(() => { + loading.value = false }) } }) diff --git a/src/styles/element.scss b/src/styles/element.scss index 541b6d7..c1bb352 100644 --- a/src/styles/element.scss +++ b/src/styles/element.scss @@ -1,4 +1,3 @@ - /* 修复 Chrome 浏览器输入框内选中字符行高异常的bug-s */ .el-input .el-input__inner { height: 30px; @@ -104,7 +103,7 @@ border-radius: var(--el-border-radius-base); box-shadow: none; -webkit-box-shadow: none; - cursor: pointer !important; + cursor: pointer !important; } &:hover { @@ -229,11 +228,19 @@ } } -.el-collapse-item__content{ +.el-collapse-item__content { padding-bottom: 0; } //解决打开dialog body容器宽度变为 calc(100% - 8px)问题 -.el-popup-parent--hidden{ +.el-popup-parent--hidden { width: 100% !important; -} \ No newline at end of file +} +// 树x轴滚动、 +.el-scrollbar .el-scrollbar__wrap { + overflow-x: hidden !important; +} +.el-tree > .el-tree-node { + min-width: 100% !important; + display: inline-block !important; +} diff --git a/src/template/dialog.vue b/src/template/dialog.vue index 8ba828a..e5061c3 100644 --- a/src/template/dialog.vue +++ b/src/template/dialog.vue @@ -17,7 +17,7 @@ @@ -40,6 +40,7 @@ const form = reactive({ remark: '', id: '' }) +const loading = ref(false) const rules = { name: [{ required: true, message: '请输入角色名称', trigger: 'blur' }], code: [{ required: true, message: '请输入角色编码', trigger: 'blur' }] @@ -63,6 +64,7 @@ const open = (text: string, data?: anyObj) => { const submit = () => { formRef.value.validate(async (valid) => { if (valid) { + loading.value = true if (form.id) { // await update(form) } else { @@ -71,6 +73,7 @@ const submit = () => { ElMessage.success('保存成功') tableStore.index() dialogVisible.value = false + loading.value = false } }) } diff --git a/src/utils/iconfont.ts b/src/utils/iconfont.ts index b0d6a0c..cbb6df5 100644 --- a/src/utils/iconfont.ts +++ b/src/utils/iconfont.ts @@ -55,7 +55,6 @@ export function getAwesomeIconfontNames() { nextTick(() => { const iconfonts = [] const sheets = getStylesFromVite('all.css') - console.log(sheets) for (const key in sheets) { const rules: any = sheets[key].cssRules for (const k in rules) { diff --git a/src/utils/request.ts b/src/utils/request.ts index e001fbb..23c560c 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -81,6 +81,7 @@ function createAxios>( config.url == '/cs-harmonic-boot/csevent/f47Curve' || config.url == '/cs-harmonic-boot/sysExcel/querySysExcel' || config.url == '/cs-device-boot/csLedger/lineTree' || + config.url == '/system-boot/file/download' || config.url == '/cs-harmonic-boot/pqSensitiveUser/getUserDevTree' ) ) @@ -103,10 +104,7 @@ function createAxios>( config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw==' } } - if ( - config.url == '/user-boot/user/generateSm2Key' || - config.url == '/pqs-auth/oauth/token' - ) { + if (config.url == '/user-boot/user/generateSm2Key' || config.url == '/pqs-auth/oauth/token') { config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw==' } @@ -195,7 +193,8 @@ function createAxios>( }, 6000) } else if (response.config.url == '/cs-harmonic-boot/cspage/getByUserId') { } else { - ElMessage.error(response.data.message || '未知错误') + let message = response.data.message + ElMessage.error(message.substring(message.indexOf(',') + 1) || '未知错误') } } return Promise.reject(response.data) diff --git a/src/views/auth/menu/api.vue b/src/views/auth/menu/api.vue index a409cff..ea48019 100644 --- a/src/views/auth/menu/api.vue +++ b/src/views/auth/menu/api.vue @@ -120,7 +120,6 @@ watch( provide('tableStore', tableStore) const addMenu = () => { - console.log(popupRef) popupRef.value.open('新增接口权限', { pid: props.id }) diff --git a/src/views/auth/menu/popupApi.vue b/src/views/auth/menu/popupApi.vue index be33e5e..83ba433 100644 --- a/src/views/auth/menu/popupApi.vue +++ b/src/views/auth/menu/popupApi.vue @@ -1,28 +1,16 @@ @@ -38,7 +38,7 @@ const emit = defineEmits(['Cancels']) const dialogVisible = ref(false) const title = ref('') const formRef = ref() - +const loading = ref(false) const defaultForm = () => ({ id: '', name: '', @@ -109,6 +109,7 @@ const onSubmit = () => { integrityLimit: form.integrityLimit, active: form.active } + loading.value = true try { if (isEdit()) { await update(payload) @@ -121,6 +122,8 @@ const onSubmit = () => { emit('Cancels') } catch { /* 请求层一般会统一提示 */ + } finally { + loading.value = false } }) } diff --git a/src/views/govern/alarm/multiCondition.vue b/src/views/govern/alarm/multiCondition.vue index 40ed75d..1d22377 100644 --- a/src/views/govern/alarm/multiCondition.vue +++ b/src/views/govern/alarm/multiCondition.vue @@ -44,7 +44,7 @@ diff --git a/src/views/govern/alarm/scopeConfig/form.vue b/src/views/govern/alarm/scopeConfig/form.vue index 114cf18..a6ad699 100644 --- a/src/views/govern/alarm/scopeConfig/form.vue +++ b/src/views/govern/alarm/scopeConfig/form.vue @@ -4,19 +4,23 @@ - + - + - + - + @@ -60,10 +64,10 @@ - + - + - + - + @@ -97,6 +101,7 @@ const emit = defineEmits(['Cancels']) const dialogVisible = ref(false) const title = ref('') const formRef = ref() +const loading = ref(false) const phaseSelect = [ { name: 'A相', @@ -240,6 +245,7 @@ const handleClosed = () => { const onSubmit = () => { formRef.value?.validate(async (valid: boolean) => { if (!valid) return + loading.value = true form.harmStart = form.harmSlider[0] form.harmEnd = form.harmSlider[1] form.phaseType = form.phaseList.join(',') @@ -256,6 +262,8 @@ const onSubmit = () => { emit('Cancels') } catch { /* 统一错误提示 */ + } finally { + loading.value = false } }) } diff --git a/src/views/govern/alarm/steadyStateEvent/index.vue b/src/views/govern/alarm/steadyStateEvent/index.vue index 5ce8fe0..5277c30 100644 --- a/src/views/govern/alarm/steadyStateEvent/index.vue +++ b/src/views/govern/alarm/steadyStateEvent/index.vue @@ -138,16 +138,17 @@ - + - + @@ -184,6 +185,7 @@ const lineList: any = ref([]) const copyRow: any = ref({}) const treeRef = ref() const loading = ref(false) +const loading1 = ref(false) // 弹框相关 const dialogVisible = ref(false) const dialogTitle = ref('新增方案') @@ -384,6 +386,7 @@ const handleClose = () => { // 提交表单 const submitForm = async () => { await formRef.value?.validate() + loading1.value = true if (dialogTitle.value == '新增方案') { await save({ harmonicTarget: '', @@ -395,6 +398,8 @@ const submitForm = async () => { ElMessage.success(`${dialogTitle.value}成功`) dialogVisible.value = false tableStore.index() // 刷新列表 + }).finally(() => { + loading1.value = false }) } else { await update({ @@ -407,6 +412,8 @@ const submitForm = async () => { ElMessage.success(`${dialogTitle.value}成功`) dialogVisible.value = false tableStore.index() // 刷新列表 + }).finally(() => { + loading1.value = false }) } diff --git a/src/views/govern/analyze/APF/APF.vue b/src/views/govern/analyze/APF/APF.vue index 0e8d5be..8cf2666 100644 --- a/src/views/govern/analyze/APF/APF.vue +++ b/src/views/govern/analyze/APF/APF.vue @@ -195,7 +195,6 @@ const setEchart = () => { let units = Object.keys(list) // console.log('🚀 ~ .then ~ units:', units) for (let unit in list) { - console.log('🚀 ~ .then ~ unit:', unit) let [min, max] = yMethod(list[unit].map((item: any) => item.statisticalData)) yAxis.push({ name: unit == 'null' ? '' : unit, diff --git a/src/views/govern/analyze/DVR/index.vue b/src/views/govern/analyze/DVR/index.vue index 09a04f0..850ceba 100644 --- a/src/views/govern/analyze/DVR/index.vue +++ b/src/views/govern/analyze/DVR/index.vue @@ -38,9 +38,9 @@ - + + @handleHideCharts="isWaveCharts = false" :wp="wp" /> @@ -216,7 +216,7 @@ const tableStore = new TableStore({ render: 'basicButton', disabled: row => { let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code - return !(code == 'Direct_Connected_Device' || code == 'Gateway') + return !((code == 'Direct_Connected_Device' || code == 'Gateway') && row.wavePath == null) }, }, @@ -228,7 +228,8 @@ const tableStore = new TableStore({ render: 'basicButton', loading: 'loading2', disabled: row => { - return row.wavePath + let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code + return !((code == 'Portable' || code == 'DEV_CLD') && row.wavePath == null) }, click: row => { let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code @@ -282,6 +283,7 @@ Object.assign(tableStore.table.params, { const flag = ref(false) tableStore.table.params.type = 0 tableStore.table.params.eventType = '' +tableStore.table.params.isDvr = '1' tableStore.table.params.location = '' provide('tableStore', tableStore) const deviceTypeChange = (val: any, obj: any) => { diff --git a/src/views/govern/cloudDeviceEntry/components/monitoring.vue b/src/views/govern/cloudDeviceEntry/components/monitoring.vue index 08ea16a..bc4db05 100644 --- a/src/views/govern/cloudDeviceEntry/components/monitoring.vue +++ b/src/views/govern/cloudDeviceEntry/components/monitoring.vue @@ -22,7 +22,7 @@ 修改 - + 删除 撤 销 - + 确认提交 - + 修改提交 @@ -116,7 +116,8 @@
+ style="width: 100%" @edit="handleDeviceTabsEdit" + @tab-click="tabChange('deviceIndex', $event)">
@@ -853,7 +854,7 @@ import { queryPushResult } from '@/api/cs-device-boot/cloudDeviceEntry' import { getTopoTemplate } from '@/api/cs-device-boot/topologyTemplate' -import { getFileUrl } from '@/api/system-boot/file' +import { downLoadFile } from '@/api/cs-system-boot/manage' import tree from '@/assets/map/area.json' import { queryByCode, queryCsDictTree, queryByid } from '@/api/system-boot/dictTree' import MacAddressInput from '@/components/form/mac/MacAddressInput.vue' @@ -872,6 +873,7 @@ const Height = mainHeight(124) const mainForm = ref() const loading = ref(false) const nextfalg = ref(false) +const loading1 = ref(false) const dictData = useDictData() const nodeLevel = ref(0) const nodeLevelCopy = ref(0) @@ -889,7 +891,7 @@ const devId: any = ref('0') const busBarId: any = ref('0') const lineId: any = ref('0') const userList: any = ref([]) -const monitorObjList: any = dictData.getBasicData('M_Obj_Types') +const monitorObjList: any = dictData.getBasicData('Interference_Source') const linePosition: any = dictData.getBasicData('Line_Position') const currentGdName: any = ref('') @@ -996,7 +998,7 @@ interface DeviceInfo { //const deviceInfoList = ref([]) interface LineInfo { name: string - lineNo: number + lineNo: number | string conType: number lineInterval: number ptRatio: number @@ -1170,8 +1172,10 @@ const getImageList = async () => { getTopoTemplate().then(res => { images.value = res.data images.value.forEach(async item => { - let row = await getFileUrl({ filePath: item.filePath }) - item.url = row.data + const blob = (await downLoadFile(item.filePath)) as unknown as Blob + if (blob?.type && blob.type !== 'application/json') { + item.url = window.URL.createObjectURL(blob) + } }) }) } @@ -1403,7 +1407,7 @@ const add = () => { // 添加一个新的空监测点到lineInfoList formData.value.lineInfoList.push({ name: '', - lineNo: 1, + lineNo: '', conType: 0, lineInterval: 1, ptRatio: 1, @@ -1480,6 +1484,7 @@ const updateEngineering = (id: any) => { province: engData.province } + loading1.value = true auditEngineering(engineeringData).then((res: any) => { ElMessage({ type: 'success', @@ -1487,6 +1492,8 @@ const updateEngineering = (id: any) => { }) pageStatus.value = 1 TerminalRef.value.info() + }).finally(() => { + loading1.value = false }) } /** @@ -1503,6 +1510,7 @@ const updateProjectFunc = (id: any) => { return } + loading1.value = true deleteProject( id, currentProject.name, @@ -1518,6 +1526,8 @@ const updateProjectFunc = (id: any) => { }) pageStatus.value = 1 treedata() + }).finally(() => { + loading1.value = false }) } /** @@ -1552,6 +1562,7 @@ const updateEquipmentFunc = (id: any) => { sort: currentDevice.sort } + loading1.value = true updateEquipment(deviceData).then((res: any) => { ElMessage({ type: 'success', @@ -1559,6 +1570,8 @@ const updateEquipmentFunc = (id: any) => { }) pageStatus.value = 1 TerminalRef.value.info() + }).finally(() => { + loading1.value = false }) } @@ -1597,7 +1610,7 @@ const updateLineFunc = (id: any) => { const lineData = { lineId: id, name: currentLine.name || '', - lineNo: currentLine.lineNo || 1, + lineNo: currentLine.lineNo, conType: currentLine.conType || 0, lineInterval: currentLine.lineInterval || 1, ptRatio: currentLine.ptRatio || 1, @@ -1620,6 +1633,7 @@ const updateLineFunc = (id: any) => { devId: devId } + loading1.value = true updateLine(lineData).then((res: any) => { ElMessage({ type: 'success', @@ -1627,9 +1641,11 @@ const updateLineFunc = (id: any) => { }) pageStatus.value = 1 treedata() + }).finally(() => { + loading1.value = false }) } - +const loading2 = ref(false) // 删除 const remove = () => { if (Object.keys(nodeData.value).length == 0) { @@ -1656,6 +1672,7 @@ const remove = () => { type: 'warning' }) .then(() => { + loading2.value = true switch (nodeData.value.level) { case 0: let data = { @@ -1672,6 +1689,8 @@ const remove = () => { setTimeout(() => { treedata() }, 100) + }).finally(() => { + loading2.value = false }) break @@ -1692,6 +1711,8 @@ const remove = () => { } else { treedata() } + }).finally(() => { + loading2.value = false }) break @@ -1712,6 +1733,8 @@ const remove = () => { } else { treedata() } + }).finally(() => { + loading2.value = false }) break @@ -1732,6 +1755,8 @@ const remove = () => { } else { treedata() } + }).finally(() => { + loading2.value = false }) break @@ -1883,7 +1908,7 @@ const next = async () => { // 创建新的监测点Tab formData.value.lineInfoList.push({ name: '', - lineNo: 1, + lineNo: '', conType: 0, lineInterval: 1, ptRatio: 1, @@ -2326,7 +2351,7 @@ const resetAllForms = () => { // 清空监测点表单 formData.value.lineInfoList.forEach(line => { line.name = '' - line.lineNo = 1 + line.lineNo = '' line.conType = 0 line.lineInterval = 1 line.ptRatio = 1 @@ -2397,7 +2422,9 @@ const submitData = () => { } } + loading1.value = true addLedger(project).then((res: any) => { + loading1.value = false ElMessage({ type: 'success', message: '新增项目成功' @@ -2416,6 +2443,8 @@ const submitData = () => { } else { TerminalRef.value.info() } + }).finally(() => { + loading1.value = false }) break case 2: // 新增设备 @@ -2454,7 +2483,9 @@ const submitData = () => { ] } + loading1.value = true addLedger(deviceData).then((res: any) => { + loading1.value = false ElMessage({ type: 'success', message: '新增设备成功' @@ -2473,6 +2504,8 @@ const submitData = () => { } else { TerminalRef.value.info() } + }).finally(() => { + loading1.value = false }) break case 3: // 新增监测点 @@ -2528,7 +2561,9 @@ const submitData = () => { ] } + loading1.value = true addLedger(lineData).then((res: any) => { + loading1.value = false ElMessage({ type: 'success', message: '新增监测点成功' @@ -2547,6 +2582,8 @@ const submitData = () => { } else { TerminalRef.value.info() } + }).finally(() => { + loading1.value = false }) break } @@ -2702,7 +2739,7 @@ const handleLineTabsEdit = (targetName: any, action: any) => { // 新增监测点 formData.value.lineInfoList.push({ name: '', - lineNo: 1, + lineNo: '', conType: 0, lineInterval: 1, ptRatio: 1, @@ -3070,4 +3107,7 @@ area() height: 60px; line-height: 60px; } +:deep(.el-tabs--top ){ + width: 100%; +} diff --git a/src/views/govern/device/control/analysisList/popup.vue b/src/views/govern/device/control/analysisList/popup.vue index 021d0f8..6adad34 100644 --- a/src/views/govern/device/control/analysisList/popup.vue +++ b/src/views/govern/device/control/analysisList/popup.vue @@ -32,7 +32,7 @@ height.value = window.innerHeight < 1080 ? 230 : 450 const tableStore: any = new TableStore({ url: '', - // publicHeight: height.value, + showPage: false, column: [ { width: '60', type: 'checkbox', fixed: 'left' }, @@ -94,7 +94,7 @@ const open = (val: any) => { dialogVisible.value = true tableData.value = val setTimeout(() => { - tableStore.index() + // tableStore.index() }, 10) } const close = () => { diff --git a/src/views/govern/device/control/index.vue b/src/views/govern/device/control/index.vue index 6524626..a450a11 100644 --- a/src/views/govern/device/control/index.vue +++ b/src/views/govern/device/control/index.vue @@ -693,12 +693,12 @@ const lineId: any = ref('') const dataLevel: any = ref('') const dataSource = ref([]) const engineeringName = ref('') +const devConType = ref('') const nodeClick = async (e: anyObj, node?: any) => { - console.log("🚀 ~ nodeClick ~ node:", e) if (e == undefined) { return (loading.value = false) } - if (e.pname?.includes('便携')) { + if (e?.pname.includes('便携')) { deviceType.value = '1' } else { deviceType.value = '2' @@ -1140,6 +1140,7 @@ const handleClick = async (tab?: any) => { devId: deviceId.value, //e.id lineId: lineId.value, //e.pid engineeringName: engineeringName.value, //e.name + lineName: (TrendList.value as any)?.name || devData.value?.name, type: 3, list: [ { @@ -1391,7 +1392,11 @@ const downloadTxt = () => { URL.revokeObjectURL(url) } -onMounted(() => { }) +onMounted(() => { + setTimeout(() => { + loading.value=false + }, 3000) + }) onBeforeUnmount(() => { clearInterval(realDataTimer.value) clearInterval(trendTimer.value) diff --git a/src/views/govern/device/control/moduleData.vue b/src/views/govern/device/control/moduleData.vue index 4093714..cc3307e 100644 --- a/src/views/govern/device/control/moduleData.vue +++ b/src/views/govern/device/control/moduleData.vue @@ -381,7 +381,6 @@ const changeDataType = () => { ? list.value[activeTab.value]?.modOutList.map(k => (k.data == 3.14159 ? 0 : k.data)) : [0] let [modOuMin, modOuMax] = yMethod([...data1||[0], ...data2||[0]]) - console.log("🚀 ~ changeDataType ~ modOuMin:", modOuMin,modOuMax) echartsData.value.yAxis[0] = { name: 'A', @@ -396,7 +395,7 @@ const changeDataType = () => { { name: 'A相负载电流', type: 'line', - data: list.value[activeTab.value].loadList + data: list.value[activeTab.value]?.loadList .filter((k: any) => k.phasicType == 'A') .map((k: any) => [k.time, k.data == 3.14159 ? null : k.data, 'A', lineStyle[0].type]), smooth: true, //让线变得平滑 @@ -408,7 +407,7 @@ const changeDataType = () => { { name: 'B相负载电流', type: 'line', - data: list.value[activeTab.value].loadList + data: list.value[activeTab.value]?.loadList .filter((k: any) => k.phasicType == 'B') .map((k: any) => [k.time, k.data == 3.14159 ? null : k.data, 'A', lineStyle[0].type]), smooth: true, //让线变得平滑 @@ -420,7 +419,7 @@ const changeDataType = () => { { name: 'C相负载电流', type: 'line', - data: list.value[activeTab.value].loadList + data: list.value[activeTab.value]?.loadList .filter((k: any) => k.phasicType == 'C') .map((k: any) => [k.time, k.data == 3.14159 ? null : k.data, 'A', lineStyle[0].type]), smooth: true, //让线变得平滑 diff --git a/src/views/govern/device/control/supplementaryRecruitment/history.vue b/src/views/govern/device/control/supplementaryRecruitment/history.vue index 1d20d3d..7ee8ee2 100644 --- a/src/views/govern/device/control/supplementaryRecruitment/history.vue +++ b/src/views/govern/device/control/supplementaryRecruitment/history.vue @@ -81,8 +81,8 @@ @@ -116,7 +116,7 @@ import { fullUrl } from '@/utils/common' defineOptions({ name: 'govern/log/debug' }) - +const loading = ref(false) const devTypeOptions: any = ref([]) const deivce: any = ref({}) const ruleFormRef = ref() @@ -510,17 +510,22 @@ const add = () => { const onSubmit = () => { ruleFormRef.value.validate((valid: any) => { if (valid) { + loading.value = true if (dialogTitle.value == '新增设备') { addEquipmentDelivery(form).then(res => { ElMessage.success('新增成功') resetForm() tableStore.onTableAction('search', {}) + }).finally(() => { + loading.value = false }) } else { editEquipmentDelivery(form).then(res => { ElMessage.success('修改成功') resetForm() tableStore.onTableAction('search', {}) + }).finally(() => { + loading.value = false }) } } diff --git a/src/views/govern/device/control/tabs/event.vue b/src/views/govern/device/control/tabs/event.vue index 61e72fd..ffbd384 100644 --- a/src/views/govern/device/control/tabs/event.vue +++ b/src/views/govern/device/control/tabs/event.vue @@ -254,6 +254,11 @@ const tableStore: any = new TableStore({ tableStore.table.params.list = tableParams.value.list tableStore.table.params.type = 3 }, + exportProcessingData: () => { + tableStore.table.allData?.forEach((row: any) => { + row.lineName = row.lineName || tableParams.value.lineName || '/' + }) + }, loadCallback: () => { } }) Object.assign(tableStore.table.params, { @@ -283,6 +288,7 @@ const isWaveCharts = ref(false) const getTableParams = (val: any) => { tableParams.value = val isWaveCharts.value = false + tableStore.exportName = { subject: val.lineName, feature: '暂态事件' } tableStore.index() } const onFilterConfirm = () => { diff --git a/src/views/govern/device/control/tabs/operatingTrend.vue b/src/views/govern/device/control/tabs/operatingTrend.vue index 58c6c63..d607ac2 100644 --- a/src/views/govern/device/control/tabs/operatingTrend.vue +++ b/src/views/govern/device/control/tabs/operatingTrend.vue @@ -199,6 +199,23 @@ const init = () => { } } }, + dataZoom: [ + { + type: 'inside', + height: 13, + start: 70, + + bottom: '20px', + end: 100, + filterMode: 'none' + }, + { + start: 0, + height: 13, + bottom: '20px', + end: 100, + filterMode: 'none' + }], series: buildColoredStepSeries(list.value) } } diff --git a/src/views/govern/device/control/tabs/trend.vue b/src/views/govern/device/control/tabs/trend.vue index ac65812..31e193a 100644 --- a/src/views/govern/device/control/tabs/trend.vue +++ b/src/views/govern/device/control/tabs/trend.vue @@ -5,7 +5,7 @@ diff --git a/src/views/govern/device/officialUser/index.vue b/src/views/govern/device/officialUser/index.vue index 8209443..85e5208 100644 --- a/src/views/govern/device/officialUser/index.vue +++ b/src/views/govern/device/officialUser/index.vue @@ -126,8 +126,8 @@ @@ -156,7 +156,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' const pageHeight = mainHeight(60) const pageHeight1 = mainHeight(125) const loading = ref(false) - +const loading1 = ref(false) const user: any = ref({}) const tableData = ref([]) const deviceTableData = ref([]) // 设备表格数据 @@ -291,12 +291,14 @@ const addData = () => { selectedDevices.forEach((item: any) => { form.portableDevList.push(item.id) }) - + loading1.value = true // 发送请求 add(form).then((res: any) => { ElMessage.success(res.message) selectUser(user.value) dialogVisible.value = false + }).finally(() => { + loading1.value = false }) } const treeRef = ref() diff --git a/src/views/govern/device/planData/components/popup.vue b/src/views/govern/device/planData/components/popup.vue index 0884082..977e9b5 100644 --- a/src/views/govern/device/planData/components/popup.vue +++ b/src/views/govern/device/planData/components/popup.vue @@ -96,8 +96,8 @@ diff --git a/src/views/govern/device/planData/components/transient.vue b/src/views/govern/device/planData/components/transient.vue index 50bdd64..5eed007 100644 --- a/src/views/govern/device/planData/components/transient.vue +++ b/src/views/govern/device/planData/components/transient.vue @@ -153,12 +153,12 @@ const tableStore = new TableStore({ isWaveCharts.value = true row.loading1 = false if (res != undefined) { - boxoList.value = { - ...row, - featureAmplitude: - row.featureAmplitude != '-' ? (row.featureAmplitude - 0) / 100 : null, - systemType: 'YPT', - } + boxoList.value = { + ...row, + featureAmplitude: + row.featureAmplitude != '-' ? (row.featureAmplitude - 0) / 100 : null, + systemType: 'YPT', + } wp.value = res.data @@ -225,7 +225,7 @@ const tableStore = new TableStore({ render: 'basicButton', disabled: row => { let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code - return !(code == 'Direct_Connected_Device' || code == 'Gateway') + return !((code == 'Direct_Connected_Device' || code == 'Gateway') && row.wavePath == null) }, }, @@ -237,7 +237,8 @@ const tableStore = new TableStore({ render: 'basicButton', loading: 'loading2', disabled: row => { - return row.wavePath + let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code + return !((code == 'Portable' || code == 'DEV_CLD') && row.wavePath == null) }, click: row => { let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code diff --git a/src/views/govern/device/planData/index.vue b/src/views/govern/device/planData/index.vue index 10bea94..8efee44 100644 --- a/src/views/govern/device/planData/index.vue +++ b/src/views/govern/device/planData/index.vue @@ -1,1174 +1,1185 @@ - - - - - + + + + + diff --git a/src/views/govern/device/tourist/index.vue b/src/views/govern/device/tourist/index.vue index 734d1a9..8dca1e7 100644 --- a/src/views/govern/device/tourist/index.vue +++ b/src/views/govern/device/tourist/index.vue @@ -30,7 +30,6 @@ const tableData = ref([]) const treeRef = ref(null) const ignoreCheckChange = ref(false) const checkChange = (data: any) => { - console.log("🚀 ~ checkChange ~ data:", data) if (data == undefined) return (loading.value = false) if (data.data.pName == '便携式设备') { if (ignoreCheckChange.value) { diff --git a/src/views/govern/manage/basic/popupDictionary.vue b/src/views/govern/manage/basic/popupDictionary.vue index 64e8067..cf70327 100644 --- a/src/views/govern/manage/basic/popupDictionary.vue +++ b/src/views/govern/manage/basic/popupDictionary.vue @@ -248,7 +248,7 @@ @@ -263,6 +263,7 @@ import { addCsDictData, updateCsDictData } from '@/api/system-boot/csDictData' const emit = defineEmits(['close']) const formRef = ref() const formRef2 = ref() +const loading = ref(false) const dictData = useDictData() const DataSelect = dictData.getBasicData('Data') const DataTypeSelect = dictData.getBasicData('Cs_Data_Type') @@ -406,6 +407,7 @@ const open = (text: string, data?: anyObj) => { const submit = async () => { formRef.value.validate(async (valid: any) => { if (valid) { + loading.value = true form.harmStart = form.harm[0] form.harmEnd = form.harm[1] if (form.id) { @@ -417,6 +419,7 @@ const submit = async () => { tableStore.index() dialogVisible.value = false emit('close') + loading.value = false } }) } diff --git a/src/views/govern/manage/basic/popupVersion.vue b/src/views/govern/manage/basic/popupVersion.vue index 79cfb7e..314bfde 100644 --- a/src/views/govern/manage/basic/popupVersion.vue +++ b/src/views/govern/manage/basic/popupVersion.vue @@ -58,7 +58,7 @@ @@ -80,6 +80,7 @@ const devModelOptions: any = ref([]) const fileList: any = ref([]) const tableStore = inject('tableStore') as TableStore const formRef = ref() +const loading = ref(false) const form = reactive({ devType: null, devTypeName: null, @@ -219,10 +220,12 @@ const submit = () => { formRef.value.validate(async (valid: boolean) => { // console.log(valid) if (valid) { + if (fileList.value.length == 0) { ElMessage.warning('请上传升级文件') return } + loading.value = true let submitForm = new FormData() for (let key in form) { submitForm.append(key, form[key]) @@ -236,6 +239,7 @@ const submit = () => { tableStore.index() dialogVisible.value = false emit('closePopup') + loading.value = false } }) } diff --git a/src/views/govern/manage/basic/template.vue b/src/views/govern/manage/basic/template.vue index 3bd0c1d..aa89050 100644 --- a/src/views/govern/manage/basic/template.vue +++ b/src/views/govern/manage/basic/template.vue @@ -48,7 +48,7 @@ import { queryByCode, queryByid } from '@/api/system-boot/dictTree' import { Plus } from '@element-plus/icons-vue' import { addDevModel } from '@/api/access-boot/analyzeModel' import { AuditDevModel } from '@/api/cs-device-boot/devmodel' -import { getFileUrl, downLoadFile } from '@/api/cs-system-boot/manage' +import { downLoadFile } from '@/api/cs-system-boot/manage' defineOptions({ name: 'govern/manage/basic/template' }) diff --git a/src/views/govern/manage/components/factoryForm.vue b/src/views/govern/manage/components/factoryForm.vue index e881f48..95f112e 100644 --- a/src/views/govern/manage/components/factoryForm.vue +++ b/src/views/govern/manage/components/factoryForm.vue @@ -40,8 +40,8 @@ @@ -74,7 +74,7 @@ const visible = defineModel('visible', { default: false }) const dialogTitle = ref('新增设备') const ruleFormRef = ref() const form: any = reactive(getDefaultForm()) - +const loading = ref(false) const cascaderProps = { label: 'projectName', value: 'projectId', @@ -236,11 +236,12 @@ const addProject = () => { const onSubmit = () => { ruleFormRef.value.validate((valid: boolean) => { if (!valid) return - + loading.value = true const payload = buildSubmitPayload() if (dialogTitle.value === '新增设备') { addEquipmentDelivery(payload).then(res => { + ElMessage.success('新增成功') const devType = props.devTypeOptions.find((item: any) => item.value == payload.devType) if (devType?.code === 'Portable') { @@ -250,19 +251,27 @@ const onSubmit = () => { portableDeviceRegister({ nDid: res.data.ndid }) .then(pres => { ElMessage.success(pres.message) + + }) + .catch(() => { + }) - .catch(() => { }) } resetForm() emit('success') + }).finally(() => { + loading.value = false }) } else { editEquipmentDelivery(payload).then(() => { ElMessage.success('修改成功') resetForm() emit('success') + }).finally(() => { + loading.value = false }) } + }) } diff --git a/src/views/govern/manage/engineering.vue b/src/views/govern/manage/engineering.vue index 761ca23..97eca04 100644 --- a/src/views/govern/manage/engineering.vue +++ b/src/views/govern/manage/engineering.vue @@ -1,15 +1,8 @@ diff --git a/src/views/govern/reportForms/look.vue b/src/views/govern/reportForms/look.vue index a35db9a..ae3fb70 100644 --- a/src/views/govern/reportForms/look.vue +++ b/src/views/govern/reportForms/look.vue @@ -1,6 +1,6 @@ diff --git a/src/views/system/scheduledTasks/form.vue b/src/views/system/scheduledTasks/form.vue index a35934e..d5353ef 100644 --- a/src/views/system/scheduledTasks/form.vue +++ b/src/views/system/scheduledTasks/form.vue @@ -25,7 +25,7 @@ @@ -41,6 +41,7 @@ const dialogVisible = ref(false) const title = ref('') const tableStore = inject('tableStore') as TableStore const formRef = ref() +const loading = ref(false) // 注意不要和表单ref的命名冲突 const form = reactive({ cron: '', @@ -85,17 +86,22 @@ onMounted(() => { const submit = () => { formRef.value.validate(async (valid: boolean) => { if (valid) { + loading.value = true if (title.value == '新增定时任务') { addTimer(form).then(res => { ElMessage.success('新增成功') dialogVisible.value = false emit('submit') + }).finally(() => { + loading.value = false }) } else { updateTimer(form).then(res => { ElMessage.success('新增成功') dialogVisible.value = false emit('submit') + }).finally(() => { + loading.value = false }) } diff --git a/src/views/system/scheduledTasks/index.vue b/src/views/system/scheduledTasks/index.vue index 3f2fd49..caac2ba 100644 --- a/src/views/system/scheduledTasks/index.vue +++ b/src/views/system/scheduledTasks/index.vue @@ -27,8 +27,8 @@
- - + +
@@ -61,6 +61,7 @@ const formDate = ref({ const taskFormRef = ref() const dialogVisible = ref(false) const selectedTime = ref('') +const loading = ref(false) const tableStore: any = new TableStore({ url: '/system-boot/timer/list', method: 'POST', @@ -154,7 +155,7 @@ const tableStore: any = new TableStore({ }, { name: 'edit', - title: '补招', + title: '补召', type: 'primary', icon: 'el-icon-EditPen', render: 'basicButton', @@ -202,13 +203,16 @@ const add = () => { } const okRun = () => { if (!formDate.value?.date) { - ElMessage.warning('请选择补招时间') + ElMessage.warning('请选择补召时间') return } + loading.value = true runTimer(formDate.value).then(res => { ElMessage.success('操作成功') dialogVisible.value = false tableStore.index() + }).finally(() => { + loading.value = false }) } onMounted(() => { diff --git a/src/views/user/popupUpdatePwd.vue b/src/views/user/popupUpdatePwd.vue index a5e51c4..950d87a 100644 --- a/src/views/user/popupUpdatePwd.vue +++ b/src/views/user/popupUpdatePwd.vue @@ -13,7 +13,7 @@ @@ -30,6 +30,7 @@ import { useRouter } from 'vue-router' const dialogVisible = ref(false) const title = ref('修改默认密码') const formRef = ref() +const loading = ref(false) // 注意不要和表单ref的命名冲突 const form = reactive({ newPwd: '', @@ -78,12 +79,15 @@ const open = (loginName: string) => { const submit = () => { formRef.value.validate(async (valid: boolean) => { if (valid) { + loading.value = true updateFirstPassword({ name: form.loginName, password: form.confirmPwd }).then((res: any) => { dialogVisible.value = false ElMessage.success('密码修改成功, 请重新登录') + }).finally(() => { + loading.value = false }) } })