From 1208f9faaa80c3d5d0d1911166918cb01173dab3 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 12 四月 2024 10:09:02 +0800
Subject: [PATCH] 文件上传url封装、工单阈值展示样式修改
---
src/views/system/threshold/index.vue | 16 +++++++++-------
src/views/system/point/index.vue | 2 +-
src/main.js | 1 +
src/views/system/work-order/index.vue | 4 ++--
4 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/main.js b/src/main.js
index 7944e09..ba602b0 100644
--- a/src/main.js
+++ b/src/main.js
@@ -58,6 +58,7 @@
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.getToken = getToken
+Vue.prototype.$uploadUrl = process.env.VUE_APP_BASE_API + "/common/upload"
// 鍏ㄥ眬缁勪欢鎸傝浇
Vue.component('DictTag', DictTag)
diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index 5a84703..578d5c0 100644
--- a/src/views/system/point/index.vue
+++ b/src/views/system/point/index.vue
@@ -84,7 +84,7 @@
<el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
- <el-table-column label="鐐逛綅鍚嶇О" align="center" prop="pointName" />
+ <el-table-column label="鐐逛綅绫诲瀷" align="center" prop="pointType" />
<el-table-column label="鏍囩" align="center" prop="tag" >
<span>{{important}}</span>
</el-table-column>
diff --git a/src/views/system/threshold/index.vue b/src/views/system/threshold/index.vue
index 5b536ca..8b6e629 100644
--- a/src/views/system/threshold/index.vue
+++ b/src/views/system/threshold/index.vue
@@ -26,15 +26,17 @@
<el-table-column label="瓒呮椂澶╂暟" align="center" prop="timeout"/>
<el-table-column label="宸ュ崟闃堝��" align="center" prop="indicator">
<template slot-scope="scope">
- <div v-for="item in JSON.parse(scope.row.indicator)" :key="item">
- {{ item.label }}锛歿{ item.value }}
+ <div v-for="item in JSON.parse(scope.row.indicator)" :key="item" style="display: flex;flex-direction: row">
+ <div style="width: 120px;text-align: right">{{ item.label }}</div>
+ <div style="width: 60px;text-align: right">{{ item.value}}</div>
</div>
</template>
</el-table-column>
<el-table-column label="涓嬪彂闃堝��" align="center" prop="indicator">
<template slot-scope="scope">
- <div v-for="item in JSON.parse(scope.row.indicator)" :key="item">
- {{ item.label }}锛歿{ item.value2 }}
+ <div v-for="item in JSON.parse(scope.row.indicator)" :key="item" style="display: flex;flex-direction: row">
+ <div style="width: 120px;text-align: right">{{ item.label }}</div>
+ <div style="width: 60px;text-align: right">{{ item.value2}}</div>
</div>
</template>
</el-table-column>
@@ -334,7 +336,7 @@
}
</script>
<style>
-.el-input-half-width {
- width: calc(50% - 6px); /* 鍑忓幓涓�浜涢棿闅� */
+.el-input-half-width {
+ width: calc(50% - 6px); /* 鍑忓幓涓�浜涢棿闅� */
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index ad79c56..db3ec0d 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -170,7 +170,7 @@
<el-form-item label="鐜板満鍥剧墖" prop="picture">
<el-upload
class="avatar-uploader"
- action="/dev-api/common/upload"
+ :action="this.$uploadUrl"
name="file"
:headers="{'Authorization': 'Bearer ' + getToken()}"
:on-success="pictureUploadSuccess"
@@ -184,7 +184,7 @@
<el-form-item label="浣愯瘉鏉愭枡" prop="certificates">
<el-upload
class="avatar-uploader"
- action="/dev-api/common/upload"
+ :action="this.$uploadUrl"
name="file"
:headers="{'Authorization': 'Bearer ' + getToken()}"
:on-success="certificateUploadSuccess"
--
Gitblit v1.8.0