Compare commits
196 Commits
a1a7256af5
...
projects/m
| Author | SHA1 | Date | |
|---|---|---|---|
| e28cd67e20 | |||
| eb063779b4 | |||
|
|
a2672c1742 | ||
| 4e97989ede | |||
|
|
67200710c9 | ||
| 7e2b75aaa5 | |||
| 8ad9b9d717 | |||
| 3bf2757e42 | |||
|
|
2267444b4a | ||
|
|
fa5a303c08 | ||
|
|
37586a31c5 | ||
|
|
40b023cd8d | ||
| 5dce57e4bb | |||
| 50a75dcb74 | |||
| 9ed4c944c5 | |||
| 6702521f31 | |||
| f37bba6747 | |||
| 365aafc21a | |||
| de65afef11 | |||
| a135877df1 | |||
|
|
8d26a9e487 | ||
|
|
76771489da | ||
|
|
27faa04c7a | ||
| c0daa74a84 | |||
| 6e7339bca3 | |||
|
|
904350a4d8 | ||
|
|
4873f750d8 | ||
| 13b522475e | |||
| 1a7e8cfc19 | |||
| a0790a6e19 | |||
| b76b8f4fe9 | |||
| 978291e68a | |||
| a5c17d2276 | |||
| a7b4e72bc2 | |||
| 99f771a445 | |||
| 7201c26792 | |||
| ad56aaf359 | |||
|
|
5033bbb206 | ||
|
|
6fc4794300 | ||
|
|
79c9f1ca66 | ||
| c74269b282 | |||
| 57deff3875 | |||
| 68d3b46bab | |||
| 4323982b89 | |||
|
|
c76078214e | ||
|
|
b527589e0f | ||
| 375273419d | |||
| a18929a261 | |||
| 6d465c17c2 | |||
| 669345c983 | |||
| b86094c630 | |||
| 2fdee9cafd | |||
| 4348d66e53 | |||
| 76c2f50bf3 | |||
| 888b5aa91f | |||
|
|
a7f1087775 | ||
|
|
b0efd66a75 | ||
| 51f72ea5d2 | |||
| d5507ec4c0 | |||
| 8802c932e2 | |||
| ee26741e62 | |||
|
|
7f5b9d5228 | ||
|
|
9eea7e049a | ||
| 328b3ff560 | |||
| b3a117f6c6 | |||
| 8929e53724 | |||
| a8fa98cb91 | |||
| db081c1bd1 | |||
| 3e9540bcc9 | |||
| 69ceadab69 | |||
| 601387184e | |||
| 54b63a7f53 | |||
| b625ef0118 | |||
|
|
8004c85c32 | ||
|
|
9041428003 | ||
| 39d06cd902 | |||
| d79ba71bd7 | |||
| 0225be1c94 | |||
| 265024d989 | |||
| 960751a264 | |||
| 978aa3a1d1 | |||
| 2eb1afe9b2 | |||
| 8cd53915c1 | |||
| 571d204d68 | |||
|
|
8dbc1d512d | ||
|
|
8af06c6c42 | ||
|
|
afafbccc0c | ||
|
|
0948737f1a | ||
| 0ce6bc07a0 | |||
| e318aa4f59 | |||
| ab09a2b08c | |||
| d2d5503792 | |||
| 6940155e4f | |||
| dfc758bfae | |||
| ec2994e928 | |||
|
|
5492666b53 | ||
| cd55b4c860 | |||
|
|
a7f811aa3e | ||
| 33188481bf | |||
| 0200fc08f1 | |||
|
|
a22da566c3 | ||
|
|
3c99ddc4c0 | ||
| 96705bd4d9 | |||
| ac28476024 | |||
| 1299a56e22 | |||
| b348a31b24 | |||
| 67d639c413 | |||
| c6d618b2b8 | |||
| aa79d15f52 | |||
| c8fb8d7589 | |||
| 51baca61cc | |||
| 847e34fcc6 | |||
| 32a43fbc3b | |||
| 20975948ef | |||
| c46c4dbf65 | |||
| 685a3308db | |||
| ac041c2f4a | |||
| dd23c49ba0 | |||
| 44452f2e89 | |||
| 8ddef0de9d | |||
| 7249abf5b1 | |||
| 76f5385140 | |||
| 27f4e034be | |||
| 75f59c3279 | |||
| bb731dfcd4 | |||
| 8c37647aab | |||
| bad7175f87 | |||
| 231e9227a5 | |||
| d3eb9d8fbc | |||
| 9a7521e691 | |||
| e82ee4e542 | |||
|
|
40e7d6b6d8 | ||
|
|
1d9b97f1d0 | ||
| cfaa17ee28 | |||
| d1cbac481d | |||
| c895975703 | |||
| 6ef90a8eba | |||
| e63b98161f | |||
| c99393dd12 | |||
| 23c1b4b3c6 | |||
| 88615a52a4 | |||
| bc3959412d | |||
|
|
010e51c0f6 | ||
|
|
a6b48280aa | ||
| 9f11fa3e00 | |||
|
|
c4091b7181 | ||
|
|
34e6a73852 | ||
| 79a6a4804a | |||
|
|
7523f98f84 | ||
|
|
b349432eaa | ||
| 4393c0e0e8 | |||
| 42177846e8 | |||
| c5b5de7a78 | |||
| 0884159dd7 | |||
| 87eccc7b25 | |||
| 8a819b84b6 | |||
| d37c5881a5 | |||
| 2b0579dc70 | |||
| 6a10afd04e | |||
| 7c1c61f8f8 | |||
| fb967fb825 | |||
|
|
25d1ac8d90 | ||
|
|
3667b98da9 | ||
| d3c289f11e | |||
| bbdf0a75f0 | |||
| 5339854df4 | |||
| 26658accfc | |||
| 31033dd7e2 | |||
|
|
3832aee028 | ||
|
|
2fbc6ea5e7 | ||
| d0cb4d383e | |||
|
|
4ce62c14ee | ||
|
|
e5966c27a3 | ||
| ea1d981a5a | |||
| 3e9f629888 | |||
|
|
ecabeeeea9 | ||
| 0f7a8fbf73 | |||
| d7366e80ee | |||
| 3da077bdf3 | |||
|
|
aef062b4c9 | ||
|
|
952490f0d4 | ||
| 51d6ce5dbb | |||
| 0ae68aacef | |||
| 2ab686a797 | |||
| a37fa65e8f | |||
| 887390cf91 | |||
| 5d054254f7 | |||
| 76cdc34af1 | |||
| 0fefe4d432 | |||
|
|
ecc84a1c4b | ||
|
|
95f7004d1c | ||
| 9a1aa047b0 | |||
| de06dfddf4 | |||
| 26100af90a | |||
| 67612c79df | |||
| 26862423c1 |
19
.env.dev
@@ -1,7 +1,7 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2023-11-11 20:50:30
|
||||
# @LastEditTime: 2023-11-21 10:36:47
|
||||
# @LastEditors: DY
|
||||
# @Description:
|
||||
###
|
||||
@@ -13,23 +13,24 @@ VUE_APP_TITLE = MES系统
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
|
||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
# 多租户的开关
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = true
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
# 多租户的开关
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = true
|
||||
|
||||
|
||||
14
.env.prod
@@ -1,3 +1,10 @@
|
||||
###
|
||||
# @Author: zhp
|
||||
# @Date: 2023-11-07 19:11:40
|
||||
# @LastEditTime: 2023-11-16 16:40:59
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
@@ -7,6 +14,10 @@ VUE_APP_TITLE = MES系统
|
||||
# 芋道管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||
|
||||
|
||||
# 根据服务器或域名修改
|
||||
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
|
||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
||||
@@ -17,9 +28,6 @@ VUE_APP_APP_NAME ='yudao-admin'
|
||||
# 多租户的开关
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = false
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
|
||||
# 多租户的开关
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = false
|
||||
|
||||
|
||||
@@ -17,9 +17,6 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/'
|
||||
# 多租户的开关
|
||||
VUE_APP_TENANT_ENABLE = true
|
||||
|
||||
# 验证码的开关
|
||||
VUE_APP_CAPTCHA_ENABLE = true
|
||||
|
||||
# 文档的开关
|
||||
VUE_APP_DOC_ENABLE = true
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.2 KiB |
68
src/api/base/coreHotMaterial.js
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-15 15:56:14
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建原料
|
||||
export function createHotMaterial(data) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新原料
|
||||
export function updateHotMaterial(data) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除原料
|
||||
export function deleteHotMaterial(id) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原料
|
||||
export function getHotMaterial(id) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原料code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/core-hot-material/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原料分页
|
||||
export function getHotMaterialPage(query) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得所有列表
|
||||
export function getHotMaterialList(query) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-06 17:49:42
|
||||
* @LastEditTime: 2023-11-15 17:19:19
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -67,6 +67,14 @@ export function getCoreWOList(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 根据工单id获得所有列表
|
||||
export function getCoreWOListById(ids) {
|
||||
return request({
|
||||
url: '/base/core-work-order/list?ids='+ ids ,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 创建工单预使用原料
|
||||
export function createCoreWOMa(data) {
|
||||
return request({
|
||||
@@ -135,4 +143,13 @@ export function statusChange(data) {
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 创建分配产量
|
||||
export function createConCoreWOr(data) {
|
||||
return request({
|
||||
url: '/base/core-order-con-work-order/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -18,6 +18,15 @@ export function deliveryProgressPage(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取订单列表
|
||||
export function listOrderList(query) {
|
||||
return request({
|
||||
url: '/extend/delivery-log/listOrderList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取发货进度分页
|
||||
export function deliveryLogDetPage(data) {
|
||||
return request({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-10-26 20:06:29
|
||||
* @LastEditTime: 2023-11-27 17:54:28
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -110,3 +110,11 @@ export function deleteMaterialPBDet(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得产品Bom详细
|
||||
export function getMaterialPBDet(id) {
|
||||
return request({
|
||||
url: '/base/material-product-bom-det/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -113,6 +113,15 @@ export function orderMonitor(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取订单绑定的工单和数量信息,可传订单id列表,map索引为订单id
|
||||
export function orderAssignmentList(query) {
|
||||
return request({
|
||||
url: '/base/order/orderAssignmentList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得所有客户列表
|
||||
export function customerList() {
|
||||
return request({
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-10-17 09:26:38
|
||||
* @LastEditTime: 2023-11-20 15:50:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建质量检测信息基础
|
||||
@@ -52,3 +59,11 @@ export function exportQualityInspectionDetExcel(query) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
export function getQualityInspectionDetList(query) {
|
||||
return request({
|
||||
url: '/base/quality-inspection-det/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-08 15:56:52
|
||||
* @LastEditTime: 2023-11-11 19:52:54
|
||||
* @LastEditTime: 2023-11-16 20:15:02
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -60,3 +60,11 @@ export function getcheckConfigByEqList(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备巡检记录
|
||||
export function deleteEqCheckLog(id) {
|
||||
return request({
|
||||
url: '/base/equipment-check-log/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-08 15:56:52
|
||||
* @LastEditTime: 2023-11-10 09:04:50
|
||||
* @LastEditTime: 2023-11-25 16:22:49
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -58,11 +58,45 @@ export function getCheckDetPage(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得x巡检所有列表
|
||||
// 获得设备巡检所有列表
|
||||
export function getcheckList(query) {
|
||||
return request({
|
||||
url: '/base/equipment-check/list',
|
||||
url: '/base/equipment-check/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 删除巡检内容
|
||||
export function deleteCheck(id) {
|
||||
return request({
|
||||
url: '/base/equipment-check/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得设备巡检设置code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/equipment-check-config/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 创建巡检配置
|
||||
export function createCheckConfig(data) {
|
||||
return request({
|
||||
url: '/base/equipment-check-config/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新巡检配置
|
||||
export function updateCheckConfig(data) {
|
||||
return request({
|
||||
url: '/base/equipment-check-config/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
44
src/api/equipment/base/maintain/record.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-08 15:56:52
|
||||
* @LastEditTime: 2023-11-23 19:10:07
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除设备保养记录
|
||||
export function deleteEqMaintainLog(id) {
|
||||
return request({
|
||||
url: '/base/equipment-maintain-log/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备保养计划配置
|
||||
export function deleteEqMaintainPlan(id) {
|
||||
return request({
|
||||
url: '/base/equipment-maintain-plan/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出设备保养监控
|
||||
export function exportMaintainMonitorExcel(query) {
|
||||
return request({
|
||||
url: '/base/equipment-maintain-plan/monitor-export',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出设备保养记录
|
||||
export function exportMaintainLogExcel(query) {
|
||||
return request({
|
||||
url: '/base/equipment-maintain-log/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-10 16:09:33
|
||||
* @LastEditTime: 2023-11-10 16:50:08
|
||||
* @LastEditTime: 2023-11-23 20:29:28
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -22,4 +22,22 @@ export function updateEqRepair(data) {
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 删除维修记录
|
||||
export function deleteRepair(id) {
|
||||
return request({
|
||||
url: '/base/equipment-repair-log/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出设备维修
|
||||
export function exportRepairLogExcel(query) {
|
||||
return request({
|
||||
url: '/base/equipment-repair-log/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-11 16:18:57
|
||||
* @LastEditTime: 2023-11-11 17:28:54
|
||||
* @LastEditTime: 2023-11-16 20:52:06
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@@ -48,4 +48,21 @@ export function getSparePartList(query) {
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 删除设备备品备件配置
|
||||
export function deleteConfig(id) {
|
||||
return request({
|
||||
url: '/base/equipment-spare-part-config/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得备品备件分页
|
||||
export function getSparePartPage(query) {
|
||||
return request({
|
||||
url: '/base/equipment-spare-part/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
16
src/api/equipment/base/spare-parts/list.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-22 13:59:17
|
||||
* @LastEditTime: 2023-11-22 13:59:45
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 删除设备备品备件
|
||||
export function deleteSparePart(id) {
|
||||
return request({
|
||||
url: '/base/equipment-spare-part/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-07 19:47:48
|
||||
* @LastEditTime: 2023-11-08 16:59:32
|
||||
* @LastEditTime: 2023-11-23 13:57:41
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@@ -12,7 +12,7 @@ export function processEquMaterialBomPage(data) {
|
||||
return request({
|
||||
url: '/extend/process-equ-material-bom/page',
|
||||
method: 'get',
|
||||
data: data
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,3 +104,18 @@ export function getMaterialList(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getMaterialCode(data) {
|
||||
return request({
|
||||
url: '/extend/process-equ-material-bom/getCode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function createProcessEquMaterialBomDetList(data) {
|
||||
return request({
|
||||
url: '/extend/process-equ-material-bom-det/createByList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-09 09:37:14
|
||||
* @LastEditTime: 2023-11-09 14:20:02
|
||||
* @LastEditTime: 2023-11-23 14:15:45
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获得能耗统计查询分页
|
||||
|
||||
export function processEquValueBomPage(data) {
|
||||
return request({
|
||||
url: '/extend/process-equ-value-bom/page',
|
||||
method: 'get',
|
||||
data: data
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,3 +104,19 @@ export function getValueList(data) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getValueCode(data) {
|
||||
return request({
|
||||
url: '/extend/process-equ-value-bom/getCode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function createProcessEquValueBomDetList(data) {
|
||||
return request({
|
||||
url: '/extend/process-equ-value-bom-det/createByList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-07 14:10:18
|
||||
* @LastEditTime: 2023-11-07 16:29:55
|
||||
* @LastEditTime: 2023-11-16 17:49:52
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@@ -12,7 +12,7 @@ export function getStatisticalDataPage(query) {
|
||||
return request({
|
||||
url: '/base/statistical-data/getStatisticData',
|
||||
method: 'get',
|
||||
data: query
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-10-31 15:05:06
|
||||
* @LastEditTime: 2023-11-03 09:05:50
|
||||
* @LastEditTime: 2023-11-28 09:28:05
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@@ -24,6 +24,14 @@ export function getWorkOrderList(query) {
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function getCoreProduct(id) {
|
||||
return request({
|
||||
url: '/base/core-product/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出物料信息
|
||||
// export function exportEnergyPlcExcel(query) {
|
||||
// return request({
|
||||
|
||||
12
src/assets/icons/svg/exitbtn.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>exit</title>
|
||||
<g id="7能源管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="系统退出" transform="translate(-1783.000000, -56.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g id="exit" transform="translate(1783.000000, 56.000000)">
|
||||
<rect id="矩形" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||
<path d="M12.0719591,1.5140625 C12.3862828,1.52338993 12.6391466,1.78322084 12.6391466,2.1015625 C12.6391466,2.41990416 12.3862828,2.67973507 12.0690068,2.68910609 L3.64375,2.6890625 L3.54375,2.7890625 L3.54375,13.26875 L3.64375,13.36875 L12.0690068,13.3687064 C12.3862828,13.3780774 12.6391466,13.6379083 12.6391466,13.95625 C12.6391466,14.2745917 12.3862828,14.5344226 12.0690068,14.5437936 L3.0890625,14.5437936 C2.69272847,14.5437936 2.36875,14.2197715 2.36875,13.8234375 L2.36875,2.234375 C2.36875,1.83804097 2.69272847,1.5140625 3.0890625,1.5140625 Z M10.8144607,5.05039818 C11.0425957,4.82226311 11.4167793,4.82226311 11.6449143,5.05039818 L14.2074143,7.61289818 C14.4357222,7.84120602 14.4353075,8.21522958 14.2060583,8.44314597 L11.6433518,11.0058518 C11.4152168,11.2339869 11.0410332,11.2339869 10.8128982,11.0058518 C10.5847631,10.7777168 10.5847631,10.4035332 10.8128982,10.1753982 L12.1519607,8.83633568 L12.08125,8.665625 L7.1640625,8.665625 C6.81403169,8.665625 6.5265625,8.37857547 6.5265625,8.028125 C6.5265625,7.67809419 6.81361203,7.390625 7.1640625,7.390625 L12.0828125,7.390625 L12.1535232,7.21991432 L10.8144607,5.88085182 C10.5863256,5.65271675 10.5863256,5.27853325 10.8144607,5.05039818 Z" id="形状结合"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
20
src/assets/icons/svg/helpbtn.svg
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 17</title>
|
||||
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.695141">
|
||||
<g id="最新参考" transform="translate(-1780.000000, -57.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g id="编组-4" transform="translate(1772.000000, 48.000000)">
|
||||
<g id="编组-17" transform="translate(8.000000, 9.000000)">
|
||||
<rect id="矩形备份-2" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||
<g id="文档" transform="translate(2.436519, 1.472460)">
|
||||
<path d="M9.61879642,0.990942446 C9.83682412,0.990942446 10.0548518,1.18867806 10.0548518,1.38641367 L10.0548518,11.6686655 C10.0548518,11.8664011 9.83682412,12.0641367 9.61879642,12.0641367 L3.60123204,12.0641367 L1.02850524,9.69130935 L1.02850524,1.38641367 C1.02850524,1.18867806 1.24653294,0.990942446 1.46456063,0.990942446 L9.61879642,0.990942446 M9.61879642,0.2 L1.50816617,0.2 C0.810477546,0.2 0.2,0.753659712 0.2,1.38641367 L0.2,10.0076863 L3.25238773,12.8550791 L9.61879642,12.8550791 C10.316485,12.8550791 10.9269626,12.3014194 10.9269626,11.6686655 L10.9269626,1.38641367 C10.9269626,0.753659712 10.316485,0.2 9.61879642,0.2 Z" id="形状"></path>
|
||||
<path d="M9.61879642,0 C10.4228194,0 11.1269626,0.638607809 11.1269626,1.38641367 L11.1269626,11.6686655 C11.1269626,12.4164713 10.4228194,13.0550791 9.61879642,13.0550791 L3.25238773,13.0550791 L3.11596256,13.0013261 L0.0635748259,10.1539333 L0,10.0076863 L0,1.38641367 C0,0.638607809 0.704143212,0 1.50816617,0 L9.61879642,0 Z M9.61879642,0.4 L1.50816617,0.4 C0.91681188,0.4 0.4,0.868711615 0.4,1.38641367 L0.4,9.921 L3.331,12.6550791 L9.61879642,12.6550791 C10.1707271,12.6550791 10.657723,12.2467792 10.7202028,11.7714283 L10.7269626,11.6686655 L10.7269626,1.38641367 C10.7269626,0.868711615 10.2101507,0.4 9.61879642,0.4 Z M9.61879642,0.790942446 C9.94315845,0.790942446 10.2548518,1.07362615 10.2548518,1.38641367 L10.2548518,11.6686655 C10.2548518,11.981453 9.94315845,12.2641367 9.61879642,12.2641367 L3.60123204,12.2641367 L3.46563766,12.2111542 L0.892910861,9.83832691 L0.828505241,9.69130935 L0.828505241,1.38641367 C0.828505241,1.07362615 1.1401986,0.790942446 1.46456063,0.790942446 L9.61879642,0.790942446 Z M9.69667678,1.08901006 L1.38668992,1.08901006 C1.27286315,1.08901006 1.14612572,1.20395189 1.14612572,1.28821491 L1.14561083,9.66174324 L3.64342649,11.9659298 L9.69667678,11.9660691 C9.79153243,11.9660691 9.8953538,11.8862484 9.92732605,11.8108781 L9.93724098,11.7668642 L9.93724098,1.28821491 C9.93724098,1.20395189 9.81050356,1.08901006 9.69667678,1.08901006 Z" id="形状"></path>
|
||||
<path d="M4.54092961,3.67913093 L2.25985278,3.67913093 C2.22052387,3.67913093 2.22052387,3.65291165 2.22052387,3.65291165 L2.22052387,2.91877199 C2.22052387,2.89255271 2.22052387,2.89255271 2.25985278,2.89255271 L4.54092961,2.89255271 C4.58025852,2.89255271 4.58025852,2.89255271 4.58025852,2.91877199 L4.58025852,3.65291165 L4.54092961,3.67913093 Z M8.86710981,5.44893192 L2.25985278,5.44893192 C2.22052387,5.44893192 2.22052387,5.44893192 2.22052387,5.40960301 L2.22052387,4.70168261 C2.22052387,4.6623537 2.22052387,4.6623537 2.25985278,4.6623537 L8.86710981,4.6623537 C8.90643872,4.6623537 8.90643872,4.6623537 8.90643872,4.70168261 L8.90643872,5.40960301 L8.86710981,5.44893192 Z M8.86710981,7.41537746 L2.25985278,7.41537746 C2.22052387,7.41537746 2.22052387,7.41537746 2.22052387,7.37604855 L2.22052387,6.66812815 C2.22052387,6.62879924 2.22052387,6.62879924 2.25985278,6.62879924 L8.86710981,6.62879924 C8.90643872,6.62879924 8.90643872,6.62879924 8.90643872,6.66812815 L8.90643872,7.37604855 L8.86710981,7.41537746 Z" id="形状"></path>
|
||||
<path d="M8.86710981,6.44841431 C9.00606257,6.44841431 9.08682365,6.5291754 9.08682365,6.66812815 L9.08682365,7.37604855 L9.03399013,7.50359996 L8.99466122,7.54292887 L8.86710981,7.59576239 L2.25985278,7.59576239 C2.12090003,7.59576239 2.04013894,7.51500131 2.04013894,7.37604855 L2.04013894,6.66812815 C2.04013894,6.5291754 2.12090003,6.44841431 2.25985278,6.44841431 L8.86710981,6.44841431 Z M8.72520451,6.80870958 L2.40090881,6.80870958 L2.40090881,7.23441802 L8.72520451,7.23441802 L8.72520451,6.80870958 Z M8.86710981,4.48196877 C9.00606257,4.48196877 9.08682365,4.56272985 9.08682365,4.70168261 L9.08682365,5.40960301 L9.03399013,5.53715441 L8.99466122,5.57648333 L8.86710981,5.62931685 L2.25985278,5.62931685 C2.12090003,5.62931685 2.04013894,5.54855576 2.04013894,5.40960301 L2.04013894,4.70168261 C2.04013894,4.56272985 2.12090003,4.48196877 2.25985278,4.48196877 L8.86710981,4.48196877 Z M8.72520451,4.84251382 L2.40090881,4.84251382 L2.40090881,5.26822226 L8.72520451,5.26822226 L8.72520451,4.84251382 Z M4.54092961,2.71216778 C4.66811215,2.71216778 4.76064346,2.77385532 4.76064346,2.91877199 L4.76064346,3.65291165 L4.68031808,3.80300099 L4.64098917,3.82922026 L4.54092961,3.85951586 L2.25985278,3.85951586 C2.18859958,3.85951586 2.12331983,3.83050264 2.08113204,3.77425225 C2.04130723,3.6964836 2.04130723,3.6964836 2.04013894,3.65291165 L2.04013894,2.91877199 C2.04013894,2.77385532 2.13267025,2.71216778 2.25985278,2.71216778 L4.54092961,2.71216778 Z M4.39957385,3.07293764 L2.40090881,3.07293764 L2.40090881,3.49864608 L4.39957385,3.49864608 L4.39957385,3.07293764 Z" id="形状"></path>
|
||||
<path d="M3.50158987,12.5394187 L3.50158987,9.83587533 L0.88525753,9.83587533 L0.88525753,8.96376455 L3.93764526,8.96376455 C4.19927849,8.96376455 4.37370065,9.1381867 4.37370065,9.39981994 L4.37370065,12.5394187 L3.50158987,12.5394187 Z" id="路径"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
12
src/assets/icons/svg/home.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组</title>
|
||||
<g id="组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="icon/banner/home" fill="#000" fill-rule="nonzero">
|
||||
<g id="编组">
|
||||
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M11.1710783,2.42919989 C11.7298936,2.09409047 12.4328291,2.12455473 12.9654367,2.52059014 L20.3218013,7.99000647 L20.4665209,8.10559268 C21.0744501,8.62656431 21.4302636,9.40344805 21.4302636,10.227099 L21.4302636,19.0470569 L21.4250327,19.2212289 C21.3382831,20.6611171 20.1833875,21.8011882 18.7715031,21.8011882 L5.2284969,21.8011882 L5.06035624,21.7957697 C3.67032883,21.7059084 2.56973638,20.5095861 2.56973638,19.0470569 L2.56973638,10.2273587 L2.57600507,10.0381789 C2.63012926,9.22282649 3.03207443,8.47038558 3.67819781,7.99000711 L11.034559,2.52059336 Z M12.0713092,3.55793652 C11.9772762,3.53774358 11.8769764,3.55793433 11.7954857,3.6185066 L4.43911542,9.0879271 L4.32641124,9.18150853 C4.04059293,9.44596068 3.87451485,9.82573182 3.87451485,10.2273587 L3.87451485,19.0470569 L3.880713,19.1821318 C3.94632222,19.8933667 4.52470053,20.4496068 5.2284969,20.4496068 L11.2507497,20.4487759 L11.3507364,20.3451977 L11.3512202,14.4627186 L11.3582338,14.3683764 C11.4044406,14.0603828 11.6734228,13.8227675 12,13.8227675 C12.3345637,13.8227675 12.6123182,14.0734451 12.6454705,14.3976012 L12.6489183,14.4681588 L12.6487364,20.3451881 L12.7487231,20.4487759 L18.7714898,20.4496068 L18.9018895,20.4431864 C19.5885066,20.3752237 20.1254851,19.7760987 20.1254851,19.0470569 L20.1254851,10.2273587 L20.1177907,10.0779557 C20.0769951,9.68325297 19.8759128,9.32208831 19.5608746,9.08791971 L12.2045243,3.61851399 L12.1402672,3.58065321 Z" id="形状结合" stroke="#000" stroke-width="0.1"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
20
src/assets/icons/svg/order-monitoring.svg
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 17</title>
|
||||
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.695141">
|
||||
<g id="最新参考" transform="translate(-1780.000000, -57.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g id="编组-4" transform="translate(1772.000000, 48.000000)">
|
||||
<g id="编组-17" transform="translate(8.000000, 9.000000)">
|
||||
<rect id="矩形备份-2" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||
<g id="文档" transform="translate(2.436519, 1.472460)">
|
||||
<path d="M9.61879642,0.990942446 C9.83682412,0.990942446 10.0548518,1.18867806 10.0548518,1.38641367 L10.0548518,11.6686655 C10.0548518,11.8664011 9.83682412,12.0641367 9.61879642,12.0641367 L3.60123204,12.0641367 L1.02850524,9.69130935 L1.02850524,1.38641367 C1.02850524,1.18867806 1.24653294,0.990942446 1.46456063,0.990942446 L9.61879642,0.990942446 M9.61879642,0.2 L1.50816617,0.2 C0.810477546,0.2 0.2,0.753659712 0.2,1.38641367 L0.2,10.0076863 L3.25238773,12.8550791 L9.61879642,12.8550791 C10.316485,12.8550791 10.9269626,12.3014194 10.9269626,11.6686655 L10.9269626,1.38641367 C10.9269626,0.753659712 10.316485,0.2 9.61879642,0.2 Z" id="形状"></path>
|
||||
<path d="M9.61879642,0 C10.4228194,0 11.1269626,0.638607809 11.1269626,1.38641367 L11.1269626,11.6686655 C11.1269626,12.4164713 10.4228194,13.0550791 9.61879642,13.0550791 L3.25238773,13.0550791 L3.11596256,13.0013261 L0.0635748259,10.1539333 L0,10.0076863 L0,1.38641367 C0,0.638607809 0.704143212,0 1.50816617,0 L9.61879642,0 Z M9.61879642,0.4 L1.50816617,0.4 C0.91681188,0.4 0.4,0.868711615 0.4,1.38641367 L0.4,9.921 L3.331,12.6550791 L9.61879642,12.6550791 C10.1707271,12.6550791 10.657723,12.2467792 10.7202028,11.7714283 L10.7269626,11.6686655 L10.7269626,1.38641367 C10.7269626,0.868711615 10.2101507,0.4 9.61879642,0.4 Z M9.61879642,0.790942446 C9.94315845,0.790942446 10.2548518,1.07362615 10.2548518,1.38641367 L10.2548518,11.6686655 C10.2548518,11.981453 9.94315845,12.2641367 9.61879642,12.2641367 L3.60123204,12.2641367 L3.46563766,12.2111542 L0.892910861,9.83832691 L0.828505241,9.69130935 L0.828505241,1.38641367 C0.828505241,1.07362615 1.1401986,0.790942446 1.46456063,0.790942446 L9.61879642,0.790942446 Z M9.69667678,1.08901006 L1.38668992,1.08901006 C1.27286315,1.08901006 1.14612572,1.20395189 1.14612572,1.28821491 L1.14561083,9.66174324 L3.64342649,11.9659298 L9.69667678,11.9660691 C9.79153243,11.9660691 9.8953538,11.8862484 9.92732605,11.8108781 L9.93724098,11.7668642 L9.93724098,1.28821491 C9.93724098,1.20395189 9.81050356,1.08901006 9.69667678,1.08901006 Z" id="形状"></path>
|
||||
<path d="M4.54092961,3.67913093 L2.25985278,3.67913093 C2.22052387,3.67913093 2.22052387,3.65291165 2.22052387,3.65291165 L2.22052387,2.91877199 C2.22052387,2.89255271 2.22052387,2.89255271 2.25985278,2.89255271 L4.54092961,2.89255271 C4.58025852,2.89255271 4.58025852,2.89255271 4.58025852,2.91877199 L4.58025852,3.65291165 L4.54092961,3.67913093 Z M8.86710981,5.44893192 L2.25985278,5.44893192 C2.22052387,5.44893192 2.22052387,5.44893192 2.22052387,5.40960301 L2.22052387,4.70168261 C2.22052387,4.6623537 2.22052387,4.6623537 2.25985278,4.6623537 L8.86710981,4.6623537 C8.90643872,4.6623537 8.90643872,4.6623537 8.90643872,4.70168261 L8.90643872,5.40960301 L8.86710981,5.44893192 Z M8.86710981,7.41537746 L2.25985278,7.41537746 C2.22052387,7.41537746 2.22052387,7.41537746 2.22052387,7.37604855 L2.22052387,6.66812815 C2.22052387,6.62879924 2.22052387,6.62879924 2.25985278,6.62879924 L8.86710981,6.62879924 C8.90643872,6.62879924 8.90643872,6.62879924 8.90643872,6.66812815 L8.90643872,7.37604855 L8.86710981,7.41537746 Z" id="形状"></path>
|
||||
<path d="M8.86710981,6.44841431 C9.00606257,6.44841431 9.08682365,6.5291754 9.08682365,6.66812815 L9.08682365,7.37604855 L9.03399013,7.50359996 L8.99466122,7.54292887 L8.86710981,7.59576239 L2.25985278,7.59576239 C2.12090003,7.59576239 2.04013894,7.51500131 2.04013894,7.37604855 L2.04013894,6.66812815 C2.04013894,6.5291754 2.12090003,6.44841431 2.25985278,6.44841431 L8.86710981,6.44841431 Z M8.72520451,6.80870958 L2.40090881,6.80870958 L2.40090881,7.23441802 L8.72520451,7.23441802 L8.72520451,6.80870958 Z M8.86710981,4.48196877 C9.00606257,4.48196877 9.08682365,4.56272985 9.08682365,4.70168261 L9.08682365,5.40960301 L9.03399013,5.53715441 L8.99466122,5.57648333 L8.86710981,5.62931685 L2.25985278,5.62931685 C2.12090003,5.62931685 2.04013894,5.54855576 2.04013894,5.40960301 L2.04013894,4.70168261 C2.04013894,4.56272985 2.12090003,4.48196877 2.25985278,4.48196877 L8.86710981,4.48196877 Z M8.72520451,4.84251382 L2.40090881,4.84251382 L2.40090881,5.26822226 L8.72520451,5.26822226 L8.72520451,4.84251382 Z M4.54092961,2.71216778 C4.66811215,2.71216778 4.76064346,2.77385532 4.76064346,2.91877199 L4.76064346,3.65291165 L4.68031808,3.80300099 L4.64098917,3.82922026 L4.54092961,3.85951586 L2.25985278,3.85951586 C2.18859958,3.85951586 2.12331983,3.83050264 2.08113204,3.77425225 C2.04130723,3.6964836 2.04130723,3.6964836 2.04013894,3.65291165 L2.04013894,2.91877199 C2.04013894,2.77385532 2.13267025,2.71216778 2.25985278,2.71216778 L4.54092961,2.71216778 Z M4.39957385,3.07293764 L2.40090881,3.07293764 L2.40090881,3.49864608 L4.39957385,3.49864608 L4.39957385,3.07293764 Z" id="形状"></path>
|
||||
<path d="M3.50158987,12.5394187 L3.50158987,9.83587533 L0.88525753,9.83587533 L0.88525753,8.96376455 L3.93764526,8.96376455 C4.19927849,8.96376455 4.37370065,9.1381867 4.37370065,9.39981994 L4.37370065,12.5394187 L3.50158987,12.5394187 Z" id="路径"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
14
src/assets/icons/svg/return.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>rollback</title>
|
||||
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="按钮与选择" transform="translate(-135.000000, -282.000000)" fill-rule="nonzero">
|
||||
<g id="编组-3" transform="translate(127.000000, 274.000000)">
|
||||
<g id="rollback" transform="translate(8.000000, 8.000000)">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||
<path d="M11.390625,3.78125 L5.71875,3.78125 L5.71875,2.625 C5.71875,2.5203125 5.5984375,2.4625 5.5171875,2.5265625 L3.2984375,4.2765625 C3.234375,4.3265625 3.234375,4.4234375 3.2984375,4.4734375 L5.5171875,6.2234375 C5.5984375,6.2875 5.71875,6.2296875 5.71875,6.125 L5.71875,4.96875 L11.203125,4.96875 C11.7554097,4.96875 12.203125,5.41646525 12.203125,5.96875 L12.203125,11.3125 C12.203125,11.8647847 11.7554097,12.3125 11.203125,12.3125 L2.93775156,12.3125 L2.93775156,12.3125 C2.55569144,12.3125 2.36466138,12.4938859 2.36466138,12.8566576 C2.36466138,13.5 2.93775156,13.5 2.93775156,13.5 C2.93775156,13.5 5.75537604,13.5 11.390625,13.5 C13,13.5 13.390625,12.8986083 13.390625,11.9909216 L13.390625,4.96875 C13.390625,4.06071182 13,3.78125 11.390625,3.78125 Z" id="路径" fill="currentColor"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
14
src/assets/icons/svg/table_edit.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="1_基础资料" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="1-1工厂信息" transform="translate(-1834.000000, -253.000000)">
|
||||
<g id="icon/界面内/编辑" transform="translate(1834.000000, 253.000000)">
|
||||
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
|
||||
<g id="常用购票人/编辑32" fill-rule="nonzero">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||
<path d="M13.5,7.8285 C13.5,7.55235763 13.7238576,7.3285 14,7.3285 C14.2761424,7.3285 14.5,7.55235763 14.5,7.8285 L14.5,12 C14.5,13.3807119 13.3807119,14.5 12,14.5 L4,14.5 C2.61928813,14.5 1.5,13.3807119 1.5,12 L1.5,4 C1.5,2.61928813 2.61928813,1.5 4,1.5 L8.759,1.5 C8.9376328,1.5 9.10269631,1.59529946 9.19201271,1.75 C9.28132911,1.90470054 9.28132911,2.09529946 9.19201271,2.25 C9.10269631,2.40470054 8.9376328,2.5 8.759,2.5 L4,2.5 C3.17157288,2.5 2.5,3.17157288 2.5,4 L2.5,12 C2.5,12.8284271 3.17157288,13.5 4,13.5 L12,13.5 C12.8284271,13.5 13.5,12.8284271 13.5,12 L13.5,7.8285 Z M13.284,2.312 C13.4738226,2.11757837 13.784168,2.11034095 13.9828473,2.2957025 C14.1815266,2.48106405 14.1958051,2.79116533 14.015,2.994 L8.56,8.845 C8.43817243,8.97566989 8.25588756,9.03141962 8.08181033,8.9912488 C7.90773311,8.95107798 7.76830999,8.82108951 7.71606033,8.65024879 C7.66381067,8.47940808 7.70667243,8.29366989 7.8285,8.163 L13.284,2.312 Z" id="形状" stroke="#0B58FF" stroke-width="0.1" fill="#0B58FF"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/images/choicepart/Core.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/images/choicepart/Delivery.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
src/assets/images/choicepart/Energy.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/images/choicepart/Equipment.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
src/assets/images/choicepart/Extend.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
src/assets/images/choicepart/Group.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/images/choicepart/Material.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/images/choicepart/Order.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
src/assets/images/choicepart/Packaging.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
src/assets/images/choicepart/Quality.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
src/assets/images/choicepart/Report.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
src/assets/images/choicepart/System.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
src/assets/images/choicepart/Warehouse.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
src/assets/images/choicepart/avatar.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
src/assets/images/choicepart/choice-item-back.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
src/assets/images/choicepart/choicepart-back.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
src/assets/images/cnbm.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/img/1.jpg
Normal file
|
After Width: | Height: | Size: 370 KiB |
BIN
src/assets/img/OperationalOverview/back.png
Normal file
|
After Width: | Height: | Size: 2.7 MiB |
BIN
src/assets/img/OperationalOverview/title.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/img/Toughenedfurnace.png
Normal file
|
After Width: | Height: | Size: 310 KiB |
BIN
src/assets/img/back.jpg
Normal file
|
After Width: | Height: | Size: 349 KiB |
BIN
src/assets/img/back.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
src/assets/img/back1.png
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
src/assets/img/bg-bottom-item.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/assets/img/choicepart/ArtManager.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
src/assets/img/choicepart/ArticleManager.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
src/assets/img/choicepart/DataAnalysis.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
src/assets/img/choicepart/EquipmentManager.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
src/assets/img/choicepart/MaterialsManage.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
src/assets/img/choicepart/OperationalOverview.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
src/assets/img/choicepart/WarehouseManager.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
src/assets/img/choicepart/basicData.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/img/choicepart/choice-item-back.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
src/assets/img/choicepart/choicepart-back.png
Normal file
|
After Width: | Height: | Size: 3.5 MiB |
BIN
src/assets/img/choicepart/energyManage.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/img/choicepart/factoryManage.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
src/assets/img/choicepart/formManage.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
src/assets/img/choicepart/orderManage.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
src/assets/img/choicepart/packingManage.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
src/assets/img/choicepart/qualityManage.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
src/assets/img/cnbm.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/img/empty.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
src/assets/img/energy.png
Normal file
|
After Width: | Height: | Size: 241 KiB |
BIN
src/assets/img/head-w.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/head.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
18
src/assets/img/jiantou.svg
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="30px" height="26px" viewBox="0 0 30 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 60 (88103) - https://sketch.com -->
|
||||
<title>icon/流程箭头备份 5</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="3_工艺流程" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="3-自定义工艺流程" transform="translate(-633.000000, -397.000000)">
|
||||
<g id="icon/流程箭头" transform="translate(630.000000, 392.000000)">
|
||||
<g id="编组-2" opacity="0.50218564" stroke-width="1" fill-rule="evenodd" transform="translate(3.000000, 5.000000)">
|
||||
<ellipse id="椭圆形" fill="#404040" cx="2.12742382" cy="13.0763435" rx="2.12742382" ry="2.21252078"></ellipse>
|
||||
<ellipse id="椭圆形备份" fill="#404040" cx="8.51227147" cy="13.0763435" rx="2.12742382" ry="2.21252078"></ellipse>
|
||||
<path d="M19.4593901,1.4429655 L21.8675258,3.61583195 C26.9580675,8.25644103 29.2570896,10.731031 29.7057398,12.459385 C29.748906,12.6160198 29.7763246,12.7796115 29.7855806,12.9482608 L29.7881771,13.0128311 L29.7890859,13.0763435 C29.7890859,13.2480738 29.7702733,13.4152344 29.7346744,13.5757179 C29.3077404,15.5566713 26.3837971,18.5124849 19.4593901,24.7097215 C18.5688126,25.5067745 17.2255693,25.4020797 16.4591722,24.4758791 C15.6927751,23.5496785 15.7934432,22.1527055 16.6840207,21.3556525 L18.3602818,19.843801 C20.3525013,18.0317598 21.9577562,16.511737 23.1725229,15.2878856 L14.8971191,15.2888643 C13.7221754,15.2888643 12.7696953,14.298285 12.7696953,13.0763435 C12.7696953,11.9075299 13.6411516,10.9503974 14.7451872,10.869378 L14.8971191,10.8638227 L23.171515,10.8637859 L22.3958746,10.0940454 C20.9337911,8.66258056 19.0284153,6.89523125 16.6840207,4.7970345 C15.7934432,3.9999815 15.6927751,2.60300846 16.4591722,1.67680788 C17.2255693,0.750607307 18.5688126,0.645912508 19.4593901,1.4429655 Z" id="形状结合" fill="#545454" fill-rule="nonzero"></path>
|
||||
</g>
|
||||
<rect id="矩形" x="0" y="0" width="36" height="36"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/img/login-back.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
src/assets/img/login-back.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
src/assets/img/login-new.jpg
Normal file
|
After Width: | Height: | Size: 340 KiB |
BIN
src/assets/img/login.gif
Normal file
|
After Width: | Height: | Size: 4.6 MiB |
BIN
src/assets/img/login1.gif
Normal file
|
After Width: | Height: | Size: 5.3 MiB |
BIN
src/assets/img/logo.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/img/medal/champion.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/img/medal/secondPlace.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/assets/img/medal/thirdPlace.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/assets/img/status.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
src/assets/img/uploadIcon.png
Normal file
|
After Width: | Height: | Size: 237 B |
@@ -6,6 +6,7 @@
|
||||
@import './btn.scss';
|
||||
|
||||
body {
|
||||
// min-height: 1024px;
|
||||
height: 100%;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
@@ -37,6 +37,9 @@ $tabWidth: $tabW * 1px;
|
||||
$rowHeight: $rowH * 1px;
|
||||
$buttonHeight: $buttonH * 1px;
|
||||
|
||||
// 1080px 高度为基准的 1px
|
||||
$base1px: 0.15vh; // 1px / 1080px;
|
||||
|
||||
// - - - - - 页面基础设置
|
||||
.container {
|
||||
.login-code {
|
||||
@@ -87,16 +90,20 @@ $buttonHeight: $buttonH * 1px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #ffffff;
|
||||
// box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07);
|
||||
// box-shadow: 0px calc(16 * 0.12vh) 40px rgba(0, 0, 0, 0.07);
|
||||
// border-radius: 20px;
|
||||
// 定位
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
||||
.pic {
|
||||
flex: 3;
|
||||
width: 1px;
|
||||
min-width: 800px;
|
||||
// 元素
|
||||
width: $picWidth;
|
||||
// width: $picWidth;
|
||||
height: $picHeight;
|
||||
// height: 10vh;
|
||||
background-image: url($picImage);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
@@ -114,49 +121,86 @@ $buttonHeight: $buttonH * 1px;
|
||||
}
|
||||
}
|
||||
.field {
|
||||
// background: #ccc3;
|
||||
position: relative;
|
||||
padding-top: 196px;
|
||||
flex: 1;
|
||||
margin-top: 14vh;
|
||||
flex: 2;
|
||||
// width: 800px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.pc-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
clear: both;
|
||||
position: relative;
|
||||
top: -36px;
|
||||
top: calc(-32 * $base1px);
|
||||
height: calc(128 * $base1px);
|
||||
|
||||
// h3.title {
|
||||
// position: relative;
|
||||
.title {
|
||||
margin: 0;
|
||||
margin-left: calc(28 * 0.12vh);
|
||||
font-weight: 400;
|
||||
user-select: none;
|
||||
color: #000;
|
||||
font-size: calc(28 * 0.12vh);
|
||||
line-height: calc(40 * 0.12vh);
|
||||
letter-spacing: calc(2 * 0.12vh);
|
||||
|
||||
// &::before {
|
||||
// content: '';
|
||||
// background: url($cnbmLogo) 100% / 100% no-repeat;
|
||||
// height: 48px;
|
||||
// width: 48px;
|
||||
// position: absolute;
|
||||
// left: 0px;
|
||||
// top: 4px;
|
||||
// display: inline-block;
|
||||
// }
|
||||
// }
|
||||
.cnbm_logo {
|
||||
height: calc(40 * 0.12vh);
|
||||
width: calc(40 * 0.12vh);
|
||||
position: relative;
|
||||
top: calc(8 * 0.12vh);
|
||||
right: calc(8 * 0.12vh);
|
||||
}
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
margin: 0;
|
||||
margin-left: calc(28 * 0.12vh);
|
||||
font-weight: 400;
|
||||
user-select: none;
|
||||
color: #000;
|
||||
font-size: calc(28 * 0.12vh);
|
||||
line-height: calc(48 * 0.12vh);
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-title,
|
||||
.mobile-switch {
|
||||
display: none;
|
||||
}
|
||||
.form {
|
||||
margin-top: 32px;
|
||||
box-sizing: border-box;
|
||||
// width: $formWidth;
|
||||
width: 100%;
|
||||
// - - - tab
|
||||
:deep(.el-tabs__nav) {
|
||||
// background: #f0f3;
|
||||
|
||||
.form-cont {
|
||||
// height: 560px;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer {
|
||||
user-select: none;
|
||||
// 元素
|
||||
margin: calc(12 * 0.12vh) 0;
|
||||
height: calc(16 * 0.12vh);
|
||||
line-height: calc(16 * 0.12vh);
|
||||
font-size: calc(12 * 0.12vh);
|
||||
color: #8c8c8c;
|
||||
|
||||
a,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
margin-top: 0;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
padding: 20px 0 0;
|
||||
}
|
||||
@@ -164,12 +208,13 @@ $buttonHeight: $buttonH * 1px;
|
||||
user-select: none;
|
||||
// 元素
|
||||
width: $tabWidth;
|
||||
height: $rowHeight;
|
||||
// height: $rowHeight;
|
||||
height: calc(54 * 0.12vh);
|
||||
padding: 0;
|
||||
// 文字
|
||||
line-height: $rowHeight;
|
||||
color: #666666;
|
||||
font-size: 18px;
|
||||
font-size: calc(14 * 0.12vh);
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -185,7 +230,8 @@ $buttonHeight: $buttonH * 1px;
|
||||
:deep(.el-input__inner) {
|
||||
// 元素
|
||||
width: 100%;
|
||||
height: $rowHeight;
|
||||
// height: $rowHeight;
|
||||
height: calc(72 * 0.12vh);
|
||||
background: #f5f5f5;
|
||||
border: 0;
|
||||
border-radius: 28px;
|
||||
@@ -255,7 +301,7 @@ $buttonHeight: $buttonH * 1px;
|
||||
margin-bottom: 20px;
|
||||
// 文字
|
||||
line-height: 26px;
|
||||
font-size: 20px;
|
||||
font-size: calc(18 * 0.12vh);
|
||||
color: #ffffff;
|
||||
}
|
||||
.button-active {
|
||||
@@ -274,39 +320,58 @@ $buttonHeight: $buttonH * 1px;
|
||||
:deep(.el-input__inner) {
|
||||
// 元素
|
||||
width: 420px;
|
||||
height: 66px;
|
||||
height: calc(52 * 0.12vh);
|
||||
// height: 66px;
|
||||
color: #262626;
|
||||
font-size: 18px;
|
||||
font-size: calc(14 * 0.12vh);
|
||||
}
|
||||
:deep(.el-checkbox__label) {
|
||||
font-size: 18px;
|
||||
line-height: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
user-select: none;
|
||||
// 元素
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
font-size: 12px;
|
||||
color: #8c8c8c;
|
||||
// 定位
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
a,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
font-size: calc(14 * 0.12vh);
|
||||
line-height: calc(12 * 0.12vh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - PC 最小尺寸设置
|
||||
@media screen and (min-width: 1920px) {
|
||||
.container {
|
||||
.content {
|
||||
.field {
|
||||
flex: initial;
|
||||
// width: 800px;
|
||||
width: 40vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-height: 1024px) {
|
||||
.container {
|
||||
.content {
|
||||
.field {
|
||||
margin-top: 16vh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-height: 1024px) {
|
||||
.container {
|
||||
.content {
|
||||
.field {
|
||||
margin-top: 8vh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media screen and (min-width: 599px) and (max-width: 1366px) {
|
||||
.container {
|
||||
min-width: 599px;
|
||||
// min-width: 599px;
|
||||
min-width: 42vw;
|
||||
|
||||
.content {
|
||||
// width: 710px;
|
||||
// height: 397px;
|
||||
@@ -317,6 +382,7 @@ $buttonHeight: $buttonH * 1px;
|
||||
display: none;
|
||||
}
|
||||
.field {
|
||||
// margin-top: 6vh;
|
||||
// width: calc(710px - 314px);
|
||||
// left: 314px;
|
||||
// justify-content: center;
|
||||
@@ -343,6 +409,14 @@ $buttonHeight: $buttonH * 1px;
|
||||
}
|
||||
}
|
||||
|
||||
// @media screen and (max-height: 1080px) {
|
||||
// .container {
|
||||
// .field {
|
||||
// transform: scale(0.74);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/* ===== MOBILE DESIGN ===== */
|
||||
$mobileW: 375;
|
||||
$mobileH: 812;
|
||||
@@ -483,7 +557,7 @@ $iconBgImage: '../assets/images/icon.png';
|
||||
|
||||
.footer {
|
||||
// 元素
|
||||
font-size: 12px;
|
||||
font-size: calc(12 * 0.12vh);
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
line-height: 17px;
|
||||
@@ -491,7 +565,7 @@ $iconBgImage: '../assets/images/icon.png';
|
||||
opacity: 0.6;
|
||||
// 定位
|
||||
// position: absolute;
|
||||
bottom: -32px;
|
||||
bottom: -calc(32 * 0.12vh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,8 +104,8 @@ h6 {
|
||||
word-break: break-word;
|
||||
background-color: #f8f8f9;
|
||||
color: #515a6e;
|
||||
height: 40px;
|
||||
font-size: 13px;
|
||||
// height: 40px;
|
||||
// font-size: 13px;
|
||||
}
|
||||
}
|
||||
.el-table__body-wrapper {
|
||||
|
||||
@@ -35,7 +35,7 @@ export default {
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
|
||||
matched = [{ path: '/', meta: { title: '首页' }}].concat(matched)
|
||||
}
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
v-if="col.subcomponent"
|
||||
:key="col.key"
|
||||
:disabled="disabled"
|
||||
:read-only="disabled"
|
||||
:is="col.subcomponent"
|
||||
v-model="form[col.prop]"
|
||||
:inlineStyle="col.style"
|
||||
@@ -75,6 +76,7 @@
|
||||
class="upload-area"
|
||||
:class="uploadOpen ? '' : 'height-48'"
|
||||
ref="uploadArea"
|
||||
:key="col.prop"
|
||||
v-if="col.upload">
|
||||
<span class="close-icon" :class="uploadOpen ? 'open' : ''">
|
||||
<el-button
|
||||
@@ -86,13 +88,18 @@
|
||||
<el-upload
|
||||
class="upload-in-dialog"
|
||||
v-if="col.upload"
|
||||
:key="col.prop + '__el-upload'"
|
||||
:action="uploadUrl"
|
||||
:headers="uploadHeaders"
|
||||
:show-file-list="false"
|
||||
icon="el-icon-upload2"
|
||||
:disabled="disabled"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-success="
|
||||
(response, file, fileList) => {
|
||||
handleUploadSuccess(response, file, col.prop);
|
||||
}
|
||||
"
|
||||
v-bind="col.bind">
|
||||
<el-button size="mini" :disabled="col.bind?.disabled || false">
|
||||
<svg-icon
|
||||
@@ -107,10 +114,10 @@
|
||||
|
||||
<uploadedFile
|
||||
class="file"
|
||||
v-for="file in form[col.prop] || []"
|
||||
v-for="file in form[col.prop]"
|
||||
:file="file"
|
||||
:key="file.fileUrl"
|
||||
@delete="!disabled && handleDeleteFile(file)" />
|
||||
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -135,6 +142,9 @@ function findMaxLabelWidth(rows) {
|
||||
if (!opt.label) return 0;
|
||||
if (opt.label.length > max) {
|
||||
max = opt.label.length;
|
||||
if (opt.label.includes('(')) {
|
||||
max = max - 3
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -151,12 +161,30 @@ const uploadedFile = {
|
||||
handleDelete() {
|
||||
this.$emit('delete', this.file);
|
||||
},
|
||||
async handleDownload() {
|
||||
const data = await this.$axios({
|
||||
url: this.file.fileUrl,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
});
|
||||
|
||||
await this.$message.success('开始下载');
|
||||
// create download link
|
||||
const url = window.URL.createObjectURL(data);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = this.file.fileName;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
render: function (h) {
|
||||
return (
|
||||
<div
|
||||
title={this.file.fileName}
|
||||
onClick={this.handleDownload}
|
||||
style={{
|
||||
background: `url(${tupleImg}) no-repeat`,
|
||||
backgroundSize: '14px',
|
||||
@@ -204,7 +232,7 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
hasFiles: {
|
||||
type: Boolean,
|
||||
type: Boolean | Array,
|
||||
default: false,
|
||||
},
|
||||
labelPosition: {
|
||||
@@ -214,7 +242,7 @@ export default {
|
||||
size: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -250,7 +278,13 @@ export default {
|
||||
handler(val) {
|
||||
this.form = JSON.parse(JSON.stringify(val));
|
||||
if (this.hasFiles) {
|
||||
this.form.files = this.form.files ?? [];
|
||||
if (typeof this.hasFiles == 'boolean' && this.hasFiles) {
|
||||
this.form.files = this.form.files ?? [];
|
||||
} else if (Array.isArray(this.hasFiles)) {
|
||||
this.hasFiles.forEach((prop) => {
|
||||
this.form[prop] = this.form[prop] ?? [];
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
@@ -346,6 +380,8 @@ export default {
|
||||
console.log('setting code: ', response.data);
|
||||
// 处理输入框数据
|
||||
this.form[opt.prop] = response.data;
|
||||
// 更新下外部的 dataForm,防止code字段有数据也报空的bug
|
||||
this.$emit('update', this.form);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -374,11 +410,12 @@ export default {
|
||||
// 上传成功的特殊处理
|
||||
beforeUpload() {},
|
||||
// 上传前的验证规则可通过 bind 属性传入
|
||||
handleUploadSuccess(response, file, fileList) {
|
||||
this.form.files.push({
|
||||
handleUploadSuccess(response, file, prop) {
|
||||
console.log('[handleUploadSuccess]', response, file, prop);
|
||||
this.form[prop].push({
|
||||
fileName: file.name,
|
||||
fileUrl: response.data,
|
||||
fileType: 2,
|
||||
fileType: prop == 'files' ? 2 : 1,
|
||||
});
|
||||
this.$modal.msgSuccess('上传成功');
|
||||
this.$emit('update', this.form);
|
||||
@@ -392,8 +429,8 @@ export default {
|
||||
this.uploadOpen = !this.uploadOpen;
|
||||
},
|
||||
|
||||
handleDeleteFile(file) {
|
||||
this.form.files = this.form.files.filter(
|
||||
handleDeleteFile(file, prop) {
|
||||
this.form[prop] = this.form[prop].filter(
|
||||
(item) => item.fileUrl != file.fileUrl
|
||||
);
|
||||
this.$emit('update', this.form);
|
||||
|
||||
@@ -1,279 +1,295 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-error="handleUploadError"
|
||||
name="file"
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
style="display: none"
|
||||
ref="upload"
|
||||
v-if="this.type === 'url'"
|
||||
>
|
||||
</el-upload>
|
||||
<div class="editor" ref="editor" :style="styles"></div>
|
||||
</div>
|
||||
<div :class="[readOnly ? 'editor-wrapper' : '']">
|
||||
<el-upload
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-error="handleUploadError"
|
||||
name="file"
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
style="display: none"
|
||||
ref="upload"
|
||||
v-if="this.type === 'url'"></el-upload>
|
||||
<div class="editor" ref="editor" :style="styles"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Quill from "quill";
|
||||
import "quill/dist/quill.core.css";
|
||||
import "quill/dist/quill.snow.css";
|
||||
import "quill/dist/quill.bubble.css";
|
||||
import { getAccessToken } from "@/utils/auth";
|
||||
import Quill from 'quill';
|
||||
import 'quill/dist/quill.core.css';
|
||||
import 'quill/dist/quill.snow.css';
|
||||
import 'quill/dist/quill.bubble.css';
|
||||
import { getAccessToken } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: "Editor",
|
||||
props: {
|
||||
/* 编辑器的内容 */
|
||||
value: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
/* 高度 */
|
||||
height: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
/* 最小高度 */
|
||||
minHeight: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
/* 只读 */
|
||||
readOnly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 上传文件大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
/* 类型(base64格式、url格式) */
|
||||
type: {
|
||||
type: String,
|
||||
default: "url",
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
|
||||
headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头部
|
||||
Quill: null,
|
||||
currentValue: "",
|
||||
options: {
|
||||
theme: "snow",
|
||||
bounds: document.body,
|
||||
debug: "warn",
|
||||
modules: {
|
||||
// 工具栏配置
|
||||
toolbar: [
|
||||
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
|
||||
["blockquote", "code-block"], // 引用 代码块
|
||||
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
|
||||
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||
[{ size: ["small", false, "large", "huge"] }], // 字体大小
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||
[{ align: [] }], // 对齐方式
|
||||
["clean"], // 清除文本格式
|
||||
["link", "image", "video"] // 链接、图片、视频
|
||||
],
|
||||
},
|
||||
placeholder: "请输入内容",
|
||||
readOnly: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
styles() {
|
||||
let style = {};
|
||||
if (this.minHeight) {
|
||||
style.minHeight = `${this.minHeight}px`;
|
||||
}
|
||||
if (this.height) {
|
||||
style.height = `${this.height}px`;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
if (val !== this.currentValue) {
|
||||
this.currentValue = val === null ? "" : val;
|
||||
if (this.Quill) {
|
||||
this.Quill.pasteHTML(this.currentValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.Quill = null;
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const editor = this.$refs.editor;
|
||||
this.Quill = new Quill(editor, this.options);
|
||||
// 取消自动聚焦 start
|
||||
this.$nextTick(()=>{
|
||||
this.Quill.blur();
|
||||
if(!this.readOnly){
|
||||
this.Quill.enable();
|
||||
}
|
||||
});
|
||||
// 如果设置了上传地址则自定义图片上传事件
|
||||
if (this.type === 'url') {
|
||||
let toolbar = this.Quill.getModule("toolbar");
|
||||
toolbar.addHandler("image", (value) => {
|
||||
this.uploadType = "image";
|
||||
if (value) {
|
||||
this.$refs.upload.$children[0].$refs.input.click();
|
||||
} else {
|
||||
this.quill.format("image", false);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.Quill.pasteHTML(this.currentValue);
|
||||
this.Quill.on("text-change", (delta, oldDelta, source) => {
|
||||
const html = this.$refs.editor.children[0].innerHTML;
|
||||
const text = this.Quill.getText();
|
||||
const quill = this.Quill;
|
||||
this.currentValue = html;
|
||||
this.$emit("input", html);
|
||||
this.$emit("on-change", { html, text, quill });
|
||||
});
|
||||
this.Quill.on("text-change", (delta, oldDelta, source) => {
|
||||
this.$emit("on-text-change", delta, oldDelta, source);
|
||||
});
|
||||
this.Quill.on("selection-change", (range, oldRange, source) => {
|
||||
this.$emit("on-selection-change", range, oldRange, source);
|
||||
});
|
||||
this.Quill.on("editor-change", (eventName, ...args) => {
|
||||
this.$emit("on-editor-change", eventName, ...args);
|
||||
});
|
||||
},
|
||||
// 上传前校检格式和大小
|
||||
handleBeforeUpload(file) {
|
||||
// 校检文件大小
|
||||
if (this.fileSize) {
|
||||
const isLt = file.size / 1024 / 1024 < this.fileSize;
|
||||
if (!isLt) {
|
||||
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
handleUploadSuccess(res, file) {
|
||||
// 获取富文本组件实例
|
||||
let quill = this.Quill;
|
||||
// 如果上传成功
|
||||
// edit by 芋道源码
|
||||
if (res.code === 200 || res.code === 0) {
|
||||
// 获取光标所在位置
|
||||
let length = quill.getSelection().index;
|
||||
// 插入图片 res.url为服务器返回的图片地址
|
||||
// edit by 芋道源码
|
||||
quill.insertEmbed(length, "image", res.data);
|
||||
// 调整光标到最后
|
||||
quill.setSelection(length + 1);
|
||||
} else {
|
||||
this.$message.error("图片插入失败");
|
||||
}
|
||||
},
|
||||
handleUploadError() {
|
||||
this.$message.error("图片插入失败");
|
||||
},
|
||||
},
|
||||
name: 'Editor',
|
||||
props: {
|
||||
/* 编辑器的内容 */
|
||||
value: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
/* 高度 */
|
||||
height: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
/* 最小高度 */
|
||||
minHeight: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
/* 只读 */
|
||||
readOnly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 上传文件大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
/* 类型(base64格式、url格式) */
|
||||
type: {
|
||||
type: String,
|
||||
default: 'url',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uploadFileUrl:
|
||||
process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 请求地址
|
||||
headers: { Authorization: 'Bearer ' + getAccessToken() }, // 设置上传的请求头部
|
||||
Quill: null,
|
||||
currentValue: '',
|
||||
options: {
|
||||
theme: 'snow',
|
||||
bounds: document.body,
|
||||
debug: 'warn',
|
||||
modules: {
|
||||
// 工具栏配置
|
||||
toolbar: [
|
||||
['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
|
||||
['blockquote', 'code-block'], // 引用 代码块
|
||||
[{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
|
||||
[{ indent: '-1' }, { indent: '+1' }], // 缩进
|
||||
[{ size: ['small', false, 'large', 'huge'] }], // 字体大小
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||
[{ align: [] }], // 对齐方式
|
||||
['clean'], // 清除文本格式
|
||||
['link', 'image', 'video'], // 链接、图片、视频
|
||||
],
|
||||
},
|
||||
placeholder: '请输入内容',
|
||||
// readOnly: false,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
styles() {
|
||||
let style = {};
|
||||
if (this.minHeight) {
|
||||
style.minHeight = `${this.minHeight}px`;
|
||||
}
|
||||
if (this.height) {
|
||||
style.height = `${this.height}px`;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
if (val !== this.currentValue) {
|
||||
this.currentValue = val === null ? '' : val;
|
||||
if (this.Quill) {
|
||||
this.Quill.pasteHTML(this.currentValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.Quill = null;
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const editor = this.$refs.editor;
|
||||
this.Quill = new Quill(editor, this.options);
|
||||
// 取消自动聚焦 start
|
||||
this.Quill?.enable(false);
|
||||
this.$nextTick(() => {
|
||||
this.Quill?.enable(true);
|
||||
this.Quill?.blur();
|
||||
// if (!this.readOnly) {
|
||||
// this.Quill?.enable();
|
||||
// }
|
||||
});
|
||||
// 如果设置了上传地址则自定义图片上传事件
|
||||
if (this.type === 'url') {
|
||||
let toolbar = this.Quill.getModule('toolbar');
|
||||
toolbar.addHandler('image', (value) => {
|
||||
this.uploadType = 'image';
|
||||
if (value) {
|
||||
this.$refs.upload.$children[0].$refs.input.click();
|
||||
} else {
|
||||
this.quill.format('image', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.Quill.pasteHTML(this.currentValue);
|
||||
this.Quill.on('text-change', (delta, oldDelta, source) => {
|
||||
const html = this.$refs.editor.children[0].innerHTML;
|
||||
const text = this.Quill.getText();
|
||||
const quill = this.Quill;
|
||||
this.currentValue = html;
|
||||
this.$emit('input', html);
|
||||
this.$emit('on-change', { html, text, quill });
|
||||
});
|
||||
this.Quill.on('text-change', (delta, oldDelta, source) => {
|
||||
this.$emit('on-text-change', delta, oldDelta, source);
|
||||
});
|
||||
this.Quill.on('selection-change', (range, oldRange, source) => {
|
||||
this.$emit('on-selection-change', range, oldRange, source);
|
||||
});
|
||||
this.Quill.on('editor-change', (eventName, ...args) => {
|
||||
this.$emit('on-editor-change', eventName, ...args);
|
||||
});
|
||||
},
|
||||
// 上传前校检格式和大小
|
||||
handleBeforeUpload(file) {
|
||||
// 校检文件大小
|
||||
if (this.fileSize) {
|
||||
const isLt = file.size / 1024 / 1024 < this.fileSize;
|
||||
if (!isLt) {
|
||||
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
handleUploadSuccess(res, file) {
|
||||
// 获取富文本组件实例
|
||||
let quill = this.Quill;
|
||||
// 如果上传成功
|
||||
// edit by 芋道源码
|
||||
if (res.code === 200 || res.code === 0) {
|
||||
// 获取光标所在位置
|
||||
let length = quill.getSelection().index;
|
||||
// 插入图片 res.url为服务器返回的图片地址
|
||||
// edit by 芋道源码
|
||||
quill.insertEmbed(length, 'image', res.data);
|
||||
// 调整光标到最后
|
||||
quill.setSelection(length + 1);
|
||||
} else {
|
||||
this.$message.error('图片插入失败');
|
||||
}
|
||||
},
|
||||
handleUploadError() {
|
||||
this.$message.error('图片插入失败');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.editor, .ql-toolbar {
|
||||
white-space: pre-wrap !important;
|
||||
line-height: normal !important;
|
||||
<style lang="scss" scoped>
|
||||
.editor-wrapper {
|
||||
position: relative;
|
||||
cursor: not-allowed;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f5f7fa77;
|
||||
}
|
||||
}
|
||||
.editor,
|
||||
.ql-toolbar {
|
||||
white-space: pre-wrap !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
.quill-img {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
.ql-snow .ql-tooltip[data-mode="link"]::before {
|
||||
content: "请输入链接地址:";
|
||||
.ql-snow .ql-tooltip[data-mode='link']::before {
|
||||
content: '请输入链接地址:';
|
||||
}
|
||||
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
|
||||
border-right: 0px;
|
||||
content: "保存";
|
||||
padding-right: 0px;
|
||||
border-right: 0px;
|
||||
content: '保存';
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.ql-snow .ql-tooltip[data-mode="video"]::before {
|
||||
content: "请输入视频地址:";
|
||||
.ql-snow .ql-tooltip[data-mode='video']::before {
|
||||
content: '请输入视频地址:';
|
||||
}
|
||||
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
|
||||
content: "14px";
|
||||
content: '14px';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
|
||||
content: "10px";
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='small']::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='small']::before {
|
||||
content: '10px';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
|
||||
content: "18px";
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='large']::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='large']::before {
|
||||
content: '18px';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
|
||||
content: "32px";
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='huge']::before,
|
||||
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='huge']::before {
|
||||
content: '32px';
|
||||
}
|
||||
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
|
||||
content: "文本";
|
||||
content: '文本';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
|
||||
content: "标题1";
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='1']::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before {
|
||||
content: '标题1';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
|
||||
content: "标题2";
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='2']::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before {
|
||||
content: '标题2';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
|
||||
content: "标题3";
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='3']::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='3']::before {
|
||||
content: '标题3';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
|
||||
content: "标题4";
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='4']::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='4']::before {
|
||||
content: '标题4';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
|
||||
content: "标题5";
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='5']::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='5']::before {
|
||||
content: '标题5';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
|
||||
content: "标题6";
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='6']::before,
|
||||
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='6']::before {
|
||||
content: '标题6';
|
||||
}
|
||||
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
|
||||
content: "标准字体";
|
||||
content: '标准字体';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
|
||||
content: "衬线字体";
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='serif']::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='serif']::before {
|
||||
content: '衬线字体';
|
||||
}
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
|
||||
content: "等宽字体";
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='monospace']::before,
|
||||
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='monospace']::before {
|
||||
content: '等宽字体';
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||
<span class="el-icon-document"> {{ fileName }} </span>
|
||||
</el-link>
|
||||
<div class="ele-upload-list__item-content-action">
|
||||
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
||||
<el-link :underline="false" @click="handleDelete(index)" :disabled="disabled" type="danger">删除</el-link>
|
||||
</div>
|
||||
</li>
|
||||
</transition-group>
|
||||
@@ -71,6 +71,11 @@ export default {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//文件名称
|
||||
fName: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -81,6 +86,7 @@ export default {
|
||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
|
||||
headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头部
|
||||
fileList: [],
|
||||
fileName: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -105,6 +111,14 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
fName: {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
console.log('11', val)
|
||||
this.fileName = val
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -117,6 +131,7 @@ export default {
|
||||
// 上传前校检格式和大小
|
||||
handleBeforeUpload(file) {
|
||||
// 校检文件类型
|
||||
this.fileName = file.name
|
||||
if (this.fileType) {
|
||||
let fileExtension = "";
|
||||
if (file.name.lastIndexOf(".") > -1) {
|
||||
@@ -150,7 +165,7 @@ export default {
|
||||
},
|
||||
// 上传失败
|
||||
handleUploadError(err) {
|
||||
this.$modal.msgError("上传图片失败,请重试");
|
||||
this.$modal.msgError("上传文件失败,请重试");
|
||||
this.$modal.closeLoading()
|
||||
},
|
||||
// 上传成功回调
|
||||
@@ -180,8 +195,12 @@ export default {
|
||||
this.number = 0;
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
this.$modal.closeLoading();
|
||||
this.returnFileName()
|
||||
}
|
||||
},
|
||||
returnFileName() {
|
||||
this.$emit('name', this.fileName)
|
||||
},
|
||||
// 获取文件名称
|
||||
getFileName(name) {
|
||||
console.log('你好', name)
|
||||
|
||||
@@ -1,978 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="dialog-with-menu" :visible="dialogVisible" :destroy-on-close="false" @close="handleClose"
|
||||
:close-on-click-modal="configs.clickModalToClose ?? true">
|
||||
<!-- title -->
|
||||
<div slot="title" class="dialog-title">
|
||||
<h1 class="">
|
||||
{{ detailMode ? "查看详情" : dataForm.id ? "编辑" : "新增" }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="dialog-body__inner relative">
|
||||
<!-- v-if="dataForm.id && !detailMode && /属性|详情/.test(activeMenu) && $hasPermission()" -->
|
||||
<el-button v-if="configs.allowAdd ?? (dataForm.id && !detailMode && /属性|详情|参数/.test(activeMenu))" plain
|
||||
type="primary" size="small" class="at-right-top" style="margin-bottom: 16px" @click="handleAddParam()">+
|
||||
添加</el-button>
|
||||
<template v-if="dataForm.id && !detailMode && /附件/.test(activeMenu)">
|
||||
<el-upload style="position: absolute; width: 100%; height: 0" name="files" :action="uploadUrl"
|
||||
:show-file-list="false" :headers="uploadHeaders" :on-success="handleUploadSuccess"
|
||||
:before-upload="handleUploadCheck">
|
||||
<el-button plain type="primary" size="small" class="at-right-top" style=""> <i class="el-icon-upload"></i> 上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<!-- menu -->
|
||||
<el-tabs v-model="activeMenu" type="card" @tab-click="handleTabClick">
|
||||
<!-- <el-tab-pane v-for="(tab, index) in configs.menu" :key="index" :label="tab.name" :name="tab.name"> -->
|
||||
<el-tab-pane v-for="(tab, index) in actualMenus" :key="index" :name="tab.name">
|
||||
<span class="slot" slot="label">
|
||||
<i :class="{
|
||||
'el-icon-edit': tab.key === 'info',
|
||||
'el-icon-s-data': tab.key === 'attr',
|
||||
'el-icon-folder-opened': tab.key === 'attachment',
|
||||
}"></i>
|
||||
{{ tab.name }}
|
||||
</span>
|
||||
|
||||
<!-- 表单标签页 -->
|
||||
<div v-if="tab.key === 'info'">
|
||||
<!-- form -->
|
||||
<el-form ref="dataForm" :model="dataForm" v-loading="loadingStatus">
|
||||
<el-row v-for="(row, rowIndex) in configs.form.rows" :key="'row_' + rowIndex" :gutter="20">
|
||||
<el-col v-for="(col, colIndex) in row" :key="colIndex" :span="24 / row.length">
|
||||
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules || null"
|
||||
v-show="!col.forceDisabled || (col.forceDisabled && dataForm.id)">
|
||||
<div v-if="col.forceDisabled && dataForm.id" class="force-disabled">
|
||||
<el-tag :key="col.key" :type="col.type">{{ dataForm[col.prop] || "-" }}</el-tag>
|
||||
</div>
|
||||
<el-input v-if="col.input" v-model="dataForm[col.prop]" clearable
|
||||
:disabled="disableCondition(col.prop)" v-bind="col.elparams" />
|
||||
<el-cascader v-if="col.cascader" v-model="dataForm[col.prop]" :options="col.options"
|
||||
:disabled="detailMode" v-bind="col.elparams"></el-cascader>
|
||||
<el-select v-if="col.select" v-model="dataForm[col.prop]" clearable
|
||||
:disabled="disableCondition(col.prop)" v-bind="col.elparams"
|
||||
@change="handleSelectChange(col, $event)">
|
||||
<el-option v-for="(opt, optIdx) in col.options" :key="'option_' + optIdx" :label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
<el-switch v-if="col.switch" v-model="dataForm[col.prop]" :active-value="1" :inactive-value="0"
|
||||
@change="handleSwitchChange" :disabled="disableCondition(col.prop)" />
|
||||
<el-input v-if="col.textarea" type="textarea" v-model="dataForm[col.prop]"
|
||||
:disabled="disableCondition(col.prop)" v-bind="col.elparams" />
|
||||
<quillEditor v-if="col.richInput" ref="quill-editor" v-model="dataForm[col.prop]"
|
||||
:options="col.quillConfig ?? defaultQuillConfig" style="margin-top: 42px"
|
||||
:disabled="disableCondition(col.prop)" />
|
||||
|
||||
<div class="" v-if="col.component" style="margin: 42px 0 0">
|
||||
<!-- 下面这个 component 几乎是为 富文本 quill 定制的了... TODO:后续可能会根据业务需求创建新的版本 -->
|
||||
<component :is="col.component" :key="'component_' + col.prop"
|
||||
@update:modelValue="handleComponentModelUpdate(col.prop, $event)" :modelValue="dataForm[col.prop]"
|
||||
:mode="detailMode ? 'detail' : dataForm.id ? 'edit' : 'create'" />
|
||||
</div>
|
||||
<!-- add more... -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 表格标签页 -->
|
||||
<div v-if="dataForm.id && tab.key === 'attr'" key="attr-list">
|
||||
<BaseListTable :table-config="null" :column-config="filteredTableProps" :table-data="subList"
|
||||
@operate-event="handleTableRowOperate" :current-page="attrPage" :current-size="attrSize"
|
||||
:refresh-layout-key="Math.random()" v-loading="loadingStatus" />
|
||||
<!-- paginator -->
|
||||
<el-pagination class="" style="text-align: left" background @size-change="handleSizeChange"
|
||||
@current-change="handlePageChange" :current-page.sync="attrPage" :page-sizes="[5, 10, 20]"
|
||||
:page-size="attrSize" :total="attrTotal" layout="total, sizes, prev, next"></el-pagination>
|
||||
</div>
|
||||
|
||||
<!-- 附件标签页 -->
|
||||
<div v-if="dataForm.id && tab.key === 'attachment'" key="attachment">
|
||||
<div class="upload-tips" style="font-size: 0.8em; margin-bottom: 12px">文件大小不要超过 2MB</div>
|
||||
<!-- 附件列表 -->
|
||||
<div class="" v-loading="loadingStatus">
|
||||
<ul class="file-list">
|
||||
<li v-for="(file, index) in fileList" :key="index">
|
||||
<span class="file-name">{{ file.name }}</span>
|
||||
<span class="file-operations">
|
||||
<span class="file-icon preview" @click="handleFileClick('view', file)">
|
||||
<i class="el-icon-view" style="cursor: pointer"></i>
|
||||
</span>
|
||||
<span class="file-icon download" @click="handleFileClick('download', file)">
|
||||
<i class="el-icon-download" style="color: #0b58ff; cursor: pointer"></i>
|
||||
</span>
|
||||
<span class="file-icon delete" @click="handleFileClick('delete', file)">
|
||||
<i class="el-icon-delete" style="color: red; cursor: pointer"></i>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- img preview dialog -->
|
||||
<el-dialog key="image-preview-dialog" class="image-preview-dialog" :visible.sync="imgPreviewDialogVisible"
|
||||
:append-to-body="true">
|
||||
<div class="img-container">
|
||||
<img width="100%" :src="currentImgUrl" alt="" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<!-- sub dialog -->
|
||||
<small-dialog :append-to-body="true" v-if="showSubDialog" ref="subDialog" :url="urls.subase"
|
||||
:configs="configs.subDialog" :related-id="dataForm.id" @refreshDataList="getSubList"></small-dialog>
|
||||
|
||||
<!-- footer -->
|
||||
<div slot="footer">
|
||||
<template v-for="(operate, index) in configs.form.operations">
|
||||
<el-button v-if="showButton(operate)" :key="'operation_' + index" :type="operate.type"
|
||||
@click="handleBtnClick(operate)"
|
||||
:loading="(operate.name === 'add' || operate.name === 'update') && btnLoading">{{ operate.label }}</el-button>
|
||||
</template>
|
||||
<el-button @click="handleBtnClick({ name: 'cancel' })">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pick as __pick } from "@/utils/filters";
|
||||
import SmallDialog from "@/components/SmallDialog.vue";
|
||||
import BaseListTable from "@/components/BaseListTable.vue";
|
||||
import Cookies from "js-cookie";
|
||||
import "quill/dist/quill.core.css";
|
||||
import "quill/dist/quill.snow.css";
|
||||
import "quill/dist/quill.bubble.css";
|
||||
|
||||
import { quillEditor } from "vue-quill-editor";
|
||||
|
||||
function reConstructTreeData(listObj) {
|
||||
const entry = [];
|
||||
Object.keys(listObj).map((key) => {
|
||||
const currentNode = listObj[key];
|
||||
currentNode.label = currentNode.name;
|
||||
currentNode.value = currentNode.id;
|
||||
if (currentNode.parentId === "0") {
|
||||
entry.push(listObj[key]);
|
||||
return; // return { label: currentNode.name, value: currentNode.id, children: currentNode.children ?? [] };
|
||||
}
|
||||
const parentNode = listObj[currentNode.parentId];
|
||||
if (!parentNode.children) {
|
||||
parentNode.children = [];
|
||||
}
|
||||
parentNode.children.push(currentNode);
|
||||
});
|
||||
return entry;
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "DialogWithMenu",
|
||||
components: { SmallDialog, BaseListTable, quillEditor },
|
||||
props: {
|
||||
configs: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
inject: ["urls"],
|
||||
data() {
|
||||
const dataForm = {};
|
||||
const autoDisabledQueue = [];
|
||||
const watingToRefreshQueue = [];
|
||||
const cached = {}
|
||||
|
||||
this.configs.form.rows.forEach((row) => {
|
||||
row.forEach((col) => {
|
||||
if (col.upload) dataForm[col.prop] = col.default ?? [];
|
||||
else dataForm[col.prop] = col.default ?? null;
|
||||
|
||||
if (col.autoDisabled) autoDisabledQueue.push(col.prop);
|
||||
if (!!col.refreshOptionsAfterConfirm) watingToRefreshQueue.push(col);
|
||||
|
||||
if (col.fetchData)
|
||||
col.fetchData().then(({ data: res }) => {
|
||||
console.log("[Fetch Data]", "list" in res.data, res.data, res.data.list);
|
||||
if (res.code === 0) {
|
||||
if (col.cacheFetchedData) {
|
||||
// cache fetched data
|
||||
cached[col.prop] = 'list' in res.data ? res.data.list : (Array.isArray(res.data) ? res.data : [])
|
||||
}
|
||||
|
||||
if (!col.options || !col.options.length) {
|
||||
this.$set(
|
||||
col,
|
||||
"options",
|
||||
"list" in res.data
|
||||
? res.data.list.map((i) => ({
|
||||
label: col.optionLabel ? i[col.optionLabel] : i.name,
|
||||
value: col.optionValue ? i[col.optionValue] : i.id,
|
||||
}))
|
||||
: res.data.map((i) => ({
|
||||
label: col.optionLabel ? i[col.optionLabel] : i.name,
|
||||
value: col.optionValue ? i[col.optionValue] : i.id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
// col.options = res.data.list;
|
||||
else if (col.options.length) {
|
||||
"list" in res.data ? res.data.list.unshift(...col.options) : res.data.unshift(...col.options);
|
||||
this.$set(
|
||||
col,
|
||||
"options",
|
||||
"list" in res.data
|
||||
? res.data.list.map((i) => ({
|
||||
label: col.optionLabel ? i[col.optionLabel] : i.name,
|
||||
value: col.optionValue ? i[col.optionValue] : i.id,
|
||||
}))
|
||||
: res.data.map((i) => ({
|
||||
label: col.optionLabel ? i[col.optionLabel] : i.name,
|
||||
value: col.optionValue ? i[col.optionValue] : i.id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
} else {
|
||||
col.options.splice(0);
|
||||
}
|
||||
// dataForm[col.prop] = col.default ?? null; // not perfect!
|
||||
});
|
||||
else if (col.fetchTreeData) {
|
||||
// 获取设备类型时触发的,用于前端构建属性结构,约定,parentId 为0时是顶级节点
|
||||
col.fetchTreeData().then(({ data: res }) => {
|
||||
console.log("[Fetch Tree Data]", res.data);
|
||||
if (res.code === 0) {
|
||||
// 先把数据先重构成一个对象
|
||||
const obj = {};
|
||||
|
||||
if ("list" in res.data) {
|
||||
res.data.list.map((item) => {
|
||||
obj[item.id] = item;
|
||||
});
|
||||
} else if (Array.isArray(res.data)) {
|
||||
res.data.map((item) => {
|
||||
obj[item.id] = item;
|
||||
});
|
||||
}
|
||||
// 再过滤这个对象
|
||||
let filteredList = reConstructTreeData(obj);
|
||||
console.log("** filteredList **", filteredList);
|
||||
// 最后设置 options
|
||||
this.$set(col, "options", filteredList);
|
||||
} else {
|
||||
col.options.splice(0);
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
// configs,
|
||||
btnLoading: false,
|
||||
loadingStatus: false,
|
||||
activeMenu: this.configs.menu[0].name,
|
||||
dataForm,
|
||||
detailMode: false,
|
||||
autoDisabledQueue,
|
||||
watingToRefreshQueue,
|
||||
cached,
|
||||
showBaseDialog: false,
|
||||
baseDialogConfig: null,
|
||||
subList: [],
|
||||
showSubDialog: false,
|
||||
disableXXX: false,
|
||||
defaultQuillConfig: {
|
||||
modules: {
|
||||
toolbar: [
|
||||
[{ font: [] }],
|
||||
[{ size: ["small", false, "large", "huge"] }], // custom dropdown
|
||||
["bold", "italic", "underline", "strike"], // toggled buttons
|
||||
[{ color: [] }, { background: [] }], // dropdown with defaults from theme
|
||||
["blockquote", "code-block"],
|
||||
[{ header: 1 }, { header: 2 }], // custom button values
|
||||
[{ list: "ordered" }, { list: "bullet" }],
|
||||
// [{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
|
||||
[{ indent: "-1" }, { indent: "+1" }], // outdent/indent
|
||||
// [{ 'direction': 'rtl' }], // text direction
|
||||
// [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
||||
// [{ 'align': [] }],
|
||||
// ['clean'] // remove formatting button
|
||||
],
|
||||
},
|
||||
theme: "snow",
|
||||
readOnly: false,
|
||||
placeholder: "在这里输入描述信息...",
|
||||
scrollingContainer: null,
|
||||
},
|
||||
attrPage: 1,
|
||||
attrSize: 10,
|
||||
attrTotal: 0,
|
||||
fileList: [],
|
||||
imgPreviewDialogVisible: false,
|
||||
currentImgUrl: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.configs.form.rows.forEach((row) => {
|
||||
row.forEach((col) => {
|
||||
if (col.changeReflects && typeof col.changeReflects === 'object' && 'fromKey' in col.changeReflects && 'toProp' in col.changeReflects) {
|
||||
this.$watch(
|
||||
() => this.dataForm[col.prop],
|
||||
val => {
|
||||
if (val && (col.prop in this.cached)) {
|
||||
console.log("here changeReflects", col.prop, col.changeReflects.toProp, this.cached[col.prop])
|
||||
if (typeof col.changeReflects.fromKey === 'string') {
|
||||
this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find(item => item.id === val)?.[col.changeReflects.fromKey]
|
||||
} else if (Array.isArray(col.changeReflects.fromKey) && col.changeReflects.delimiter) {
|
||||
const foundItem = this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find(item => item.id === val)
|
||||
if (foundItem) {
|
||||
const values = col.changeReflects.fromKey.map(key => foundItem[key])
|
||||
this.dataForm[col.changeReflects.toProp] = values.join(col.changeReflects.delimiter)
|
||||
} else {
|
||||
this.dataForm[col.changeReflects.toProp] = col.changeReflects.delimiter
|
||||
console.log("[DialogWithMenu] mounted() 没找到对应数据")
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: false
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
watch: {
|
||||
dialogVisible: function (val) {
|
||||
if (!!val) {
|
||||
this.attrPage = 1
|
||||
this.attrSize = 10
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
actualMenus() {
|
||||
return this.configs.menu.filter((m) => {
|
||||
if (m.onlyEditMode && !this.dataForm.id) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
},
|
||||
filteredTableProps() {
|
||||
return this.detailMode ? this.configs.table.props.filter((v) => v.prop !== "operations") : this.configs.table.props;
|
||||
},
|
||||
uploadHeaders() {
|
||||
return {
|
||||
token: Cookies.get("token") || "",
|
||||
};
|
||||
},
|
||||
uploadUrl() {
|
||||
return this.configs.menu.find((item) => item.key === "attachment")?.actionUrl || "#";
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
disableCondition(prop) {
|
||||
return this.detailMode || (this.disableXXX && this.autoDisabledQueue.indexOf(prop) !== -1);
|
||||
},
|
||||
/** utitilities */
|
||||
showButton(operate) {
|
||||
const notDetailMode = !this.detailMode;
|
||||
const showAlways = operate.showAlways ?? false;
|
||||
const editMode = operate.showOnEdit && this.dataForm.id;
|
||||
const addMode = !operate.showOnEdit && !this.dataForm.id;
|
||||
const permission = operate.permission ? this.$hasPermission(operate.permission) : true;
|
||||
const currentMenuKey = this.configs.menu.find((item) => item.name === this.activeMenu)?.key;
|
||||
return notDetailMode && (showAlways || ((editMode || addMode) && permission)) && currentMenuKey === "info";
|
||||
},
|
||||
|
||||
resetForm(excludeId = false, immediate = false) {
|
||||
setTimeout(
|
||||
() => {
|
||||
Object.keys(this.dataForm).forEach((key) => {
|
||||
if (excludeId && key === "id") return;
|
||||
if ("files" in this.dataForm) this.dataForm.files = [];
|
||||
if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
|
||||
else this.dataForm[key] = null;
|
||||
if (Array.isArray(this.fileList)) {
|
||||
this.fileList = [];
|
||||
}
|
||||
});
|
||||
this.activeMenu = this.configs.menu[0].name;
|
||||
this.$refs.dataForm[0].clearValidate();
|
||||
},
|
||||
immediate ? 0 : 200
|
||||
);
|
||||
},
|
||||
|
||||
updateOptions() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.watingToRefreshQueue.length) {
|
||||
this.watingToRefreshQueue.forEach((opt) => {
|
||||
console.log("[刷新数据, ", opt, "]");
|
||||
if ("fetchData" in opt) {
|
||||
opt.fetchData(this.dataForm.id ? this.dataForm.id : -1).then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(
|
||||
opt,
|
||||
"options",
|
||||
"list" in res.data
|
||||
? res.data.list.map((i) => ({ label: i.code, value: i.id }))
|
||||
: res.data.map((i) => ({ label: i.code, value: i.id }))
|
||||
);
|
||||
|
||||
resolve({ done: true });
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
|
||||
resolve({ done: false });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else resolve(null);
|
||||
});
|
||||
},
|
||||
|
||||
/** init **/
|
||||
init(id, detailMode, menu) {
|
||||
// this.dialogVisible = true;
|
||||
if (this.$refs.dataForm && this.$refs.dataForm.length) {
|
||||
// 当不是首次渲染dialog的时候,一开始就清空验证信息,本组件的循环里只有一个 dataForm 所以只用取 [0] 即可
|
||||
this.$refs.dataForm[0].clearValidate();
|
||||
}
|
||||
console.log("[dialog] DialogWithHead init():", id, detailMode);
|
||||
|
||||
this.detailMode = detailMode ?? false;
|
||||
this.$nextTick(() => {
|
||||
this.dataForm.id = id || null;
|
||||
if (this.dataForm.id) {
|
||||
// 如果是编辑
|
||||
this.loadingStatus = true;
|
||||
// 提前获取属性列表
|
||||
this.getSubList();
|
||||
// 获取详情
|
||||
this.updateOptions().then((result) => {
|
||||
if (result === null || (typeof result === "object" && result.done)) {
|
||||
this.$http.get(this.urls.base + `/${this.dataForm.id}`).then(({ data: res }) => {
|
||||
if (res && res.code === 0) {
|
||||
const dataFormKeys = Object.keys(this.dataForm);
|
||||
this.dataForm = __pick(res.data, dataFormKeys);
|
||||
if ("files" in res.data) {
|
||||
console.log("[DialogWithMenu] fileList===>", res.data.files, this.fileList);
|
||||
/** 返回的文件列表 */
|
||||
this.fileList = res.data.files
|
||||
? res.data.files.map((file) => ({
|
||||
id: file.id,
|
||||
name: file.fileUrl.split("/").pop(),
|
||||
url: file.fileUrl,
|
||||
typeCode: file.typeCode,
|
||||
}))
|
||||
: [];
|
||||
}
|
||||
}
|
||||
this.loadingStatus = false;
|
||||
// 是否要跳转到附件页
|
||||
if (menu && menu.key) {
|
||||
this.activeMenu = this.configs.menu.find((item) => item.key === menu.key)?.name;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 如果不是编辑
|
||||
this.updateOptions();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** handlers */
|
||||
handleFileClick(type, file) {
|
||||
switch (type) {
|
||||
case "view": {
|
||||
// 加载图片
|
||||
this.$http
|
||||
.get("/pms/attachment/downloadFile", {
|
||||
params: {
|
||||
attachmentId: file.id,
|
||||
type: 0, // 0 预览,1 下载
|
||||
},
|
||||
responseType: "blob",
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
console.log("preivew", res);
|
||||
if (/image/i.test(res.type)) {
|
||||
// 显示图片
|
||||
this.currentImgUrl = URL.createObjectURL(res);
|
||||
this.imgPreviewDialogVisible = true;
|
||||
} else if (/pdf/i.test(res.type)) {
|
||||
// 预览pdf
|
||||
let a = document.createElement('a')
|
||||
a.setAttribute('target', '_blank')
|
||||
a.href = URL.createObjectURL(res)
|
||||
a.click()
|
||||
console.log('before remove a ', a)
|
||||
a.remove()
|
||||
console.log('removed a ', a)
|
||||
} else {
|
||||
this.$message({
|
||||
message: "非图片和PDF文件请下载后预览",
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case "download": {
|
||||
// 下载图片
|
||||
this.$http
|
||||
.get("/pms/attachment/downloadFile", {
|
||||
params: {
|
||||
attachmentId: file.id,
|
||||
type: 1, // 0 预览,1 下载
|
||||
},
|
||||
responseType: "blob",
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
const blob = new Blob([res]);
|
||||
|
||||
/** 通知 */
|
||||
this.$notify({
|
||||
title: "成功",
|
||||
message: "开始下载",
|
||||
type: "success",
|
||||
duration: 1200,
|
||||
});
|
||||
|
||||
if ("download" in document.createElement("a")) {
|
||||
const alink = document.createElement("a");
|
||||
alink.download = file.name;
|
||||
alink.style.display = "none";
|
||||
alink.target = "_blank";
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
document.body.removeChild(alink);
|
||||
} else {
|
||||
navigator.msSaveBlob(blob, fileName);
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "delete": {
|
||||
return this.$confirm(`确定删除图片: ${file.name}`, "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "我再想想",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.loadingStatus = true;
|
||||
const newFilelist = this.fileList.filter((f) => f.id !== file.id);
|
||||
this.updateRemoteFiles(newFilelist).then((msg) => {
|
||||
if (msg && msg === "success") {
|
||||
this.fileList = newFilelist;
|
||||
this.loadingStatus = false;
|
||||
/** 通知 */
|
||||
this.$notify({
|
||||
title: "成功",
|
||||
message: "已删除",
|
||||
type: "success",
|
||||
duration: 1200,
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => { });
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleUploadSuccess(response, file, fileList) {
|
||||
console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
|
||||
|
||||
if (response.code === 0) {
|
||||
const uploadedFile = response.data[0];
|
||||
const fileItem = {
|
||||
id: uploadedFile.id,
|
||||
name: uploadedFile.fileUrl.split("/").pop(),
|
||||
url: uploadedFile.fileUrl,
|
||||
typeCode: file.typeCode,
|
||||
};
|
||||
|
||||
this.loadingStatus = true;
|
||||
this.updateRemoteFiles([...this.fileList, fileItem]).then((msg) => {
|
||||
if (msg && msg === "success") {
|
||||
this.fileList.push(fileItem);
|
||||
this.loadingStatus = false;
|
||||
/** 通知 */
|
||||
this.$notify({
|
||||
title: "成功",
|
||||
message: "上传成功",
|
||||
type: "success",
|
||||
duration: 1200,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
updateRemoteFiles(filelist) {
|
||||
return this.$http
|
||||
.put("/pms/product", {
|
||||
id: "id" in this.dataForm ? this.dataForm.id : "DEFAULT_ID",
|
||||
fileIds: filelist.map((f) => f.id),
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) return "success";
|
||||
});
|
||||
},
|
||||
|
||||
handleUploadCheck(file) {
|
||||
console.log("[before upload]", file);
|
||||
const LIMIT = 2 * 1024 * 1024; // bytes
|
||||
if (file.size > LIMIT) {
|
||||
this.$message({
|
||||
message: "文件大小不能超过 2MB",
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
return false;
|
||||
} else return true;
|
||||
},
|
||||
|
||||
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
|
||||
this.dataForm[propName] = JSON.stringify(data);
|
||||
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
|
||||
},
|
||||
handleSelectChange(col, eventValue) {
|
||||
console.log("[dialog] select change: ", col, eventValue);
|
||||
},
|
||||
handleSwitchChange(val) {
|
||||
console.log("[dialog] switch change: ", val, this.dataForm);
|
||||
},
|
||||
handleBtnClick(payload) {
|
||||
console.log("btn click payload: ", payload);
|
||||
|
||||
if ("name" in payload) {
|
||||
switch (payload.name) {
|
||||
case "cancel":
|
||||
this.handleClose();
|
||||
break;
|
||||
case "reset":
|
||||
this.resetForm(true, true); // true means exclude id
|
||||
break;
|
||||
case "add":
|
||||
case "update": {
|
||||
this.$refs.dataForm[0].validate((passed, result) => {
|
||||
if (passed) {
|
||||
// 如果通过验证
|
||||
this.btnLoading = true
|
||||
this.loadingStatus = true;
|
||||
const method = payload.name === "add" ? "POST" : "PUT";
|
||||
|
||||
// 判断是否有附件选项
|
||||
const hasAttachment = !!this.configs.menu.find((item) => item.key === "attachment");
|
||||
if (hasAttachment) {
|
||||
const fileIds = this.fileList.map((item) => item.id);
|
||||
this.$set(this.dataForm, "fileIds", fileIds);
|
||||
}
|
||||
|
||||
// 加载额外需要的 id
|
||||
let extraIds = {};
|
||||
if (this.configs.extraIds && typeof this.configs.extraIds === "object") {
|
||||
// 如果配置里,有 extraIds 选项
|
||||
Object.entries(this.configs.extraIds).forEach(([key, value]) => {
|
||||
extraIds[key] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 实际发送请求
|
||||
this.btnLoading = true
|
||||
this.$http({
|
||||
url: this.urls.base,
|
||||
method,
|
||||
data: {
|
||||
...extraIds,
|
||||
...this.dataForm,
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.btnLoading = false
|
||||
this.loadingStatus = false;
|
||||
console.log("[add&update] res is: ", res);
|
||||
if (res.code === 0) {
|
||||
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
|
||||
this.$emit("refreshDataList");
|
||||
|
||||
// 如果 watingToRefreshQueue 队列里有数据
|
||||
// if (this.watingToRefreshQueue.length) {
|
||||
// // 刷新队列
|
||||
// this.watingToRefreshQueue.forEach((opt) => {
|
||||
// console.log("[刷新数据, ", opt, "]");
|
||||
// if ("fetchData" in opt) {
|
||||
// opt.fetchData().then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// this.$set(
|
||||
// opt,
|
||||
// "options",
|
||||
// "list" in res.data
|
||||
// ? res.data.list.map((i) => ({ label: i.name, value: i.id }))
|
||||
// : res.data.map((i) => ({ label: i.name, value: i.id }))
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
this.handleClose();
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 2000,
|
||||
});
|
||||
if (this.btnLoading) this.btnLoading = false
|
||||
}
|
||||
})
|
||||
.catch((errMsg) => {
|
||||
this.$message.error("参数错误:" + errMsg);
|
||||
if (this.loadingStatus) this.loadingStatus = false;
|
||||
if (this.btnLoading) this.btnLoading = false
|
||||
});
|
||||
} else {
|
||||
this.$message.error("请核查字段信息");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
handleTabClick(payload) {
|
||||
// console.log("tab click payload: ", this.activeMenu);
|
||||
// if (this.activeMenu === this.configs.menu[1].name) {
|
||||
// // 获取数据
|
||||
// this.getSubList();
|
||||
// }
|
||||
},
|
||||
|
||||
handlePageChange(val) {
|
||||
this.getSubList(val, this.attrSize);
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.attrPage = 1;
|
||||
this.attrSize = val
|
||||
this.getSubList(1, val);
|
||||
},
|
||||
|
||||
getSubList(page, size) {
|
||||
const params = {};
|
||||
params.page = page ?? this.attrPage;
|
||||
params.limit = size ?? this.attrSize;
|
||||
|
||||
const requiredParams = this.configs.table.extraParams;
|
||||
if (requiredParams) {
|
||||
if (Array.isArray(requiredParams)) {
|
||||
requiredParams.forEach((str) => {
|
||||
if (/id/i.test(str)) {
|
||||
params[str] = this.dataForm.id;
|
||||
} else {
|
||||
params[str] = "";
|
||||
}
|
||||
});
|
||||
} else if (typeof requiredParams === "string") {
|
||||
// 如果需要额外参数,一般肯定需要
|
||||
params[this.configs.table.extraParams] = this.dataForm.id;
|
||||
// 此时 dataForm.id 一定是存在的
|
||||
}
|
||||
}
|
||||
this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
|
||||
console.log("[DialogWithMenu] getSubList:", res);
|
||||
if (res.code === 0 && res.data?.list) {
|
||||
// 有数据
|
||||
this.subList = res.data.list;
|
||||
this.attrTotal = res.data.total;
|
||||
} else {
|
||||
this.subList.splice(0);
|
||||
this.attrTotal = 0;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleAddParam(id) {
|
||||
this.showSubDialog = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.subDialog.init(id ?? null);
|
||||
});
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.resetForm();
|
||||
this.$emit("update:dialogVisible", false);
|
||||
},
|
||||
|
||||
/** 列表handlers */
|
||||
handleAddItem() {
|
||||
// console.log('[dialog] handleAddItem ot list...');
|
||||
this.showBaseDialog = true;
|
||||
this.$nextTick(() => {
|
||||
console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
|
||||
});
|
||||
},
|
||||
handleTableRowOperate({ type, data }) {
|
||||
console.log("handleTableRowOperate", type, data);
|
||||
|
||||
switch (type) {
|
||||
case "delete": {
|
||||
// 确认是否删除
|
||||
console.log('delete....', data)
|
||||
const itemName = typeof data === 'object' ? (data.attrName || data.name || data.material || data.id) : data
|
||||
return this.$confirm(`是否删除条目: ${itemName}`, "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "我再想想",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
// this.$http.delete(this.urls.base + `/${data}`).then((res) => {
|
||||
this.$http({
|
||||
url: this.urls.subase,
|
||||
method: "DELETE",
|
||||
data: [`${data.id}`],
|
||||
}).then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success({
|
||||
message: "删除成功!",
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.getSubList(1, 20);
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => { });
|
||||
}
|
||||
case "edit": {
|
||||
this.handleAddParam(data); /** data is ==> id */
|
||||
break;
|
||||
}
|
||||
// case 'view-detail-action':
|
||||
// this.openDialog(data, true);
|
||||
// break;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-menu {
|
||||
margin: 16px 0 !important;
|
||||
}
|
||||
|
||||
.el-menu.el-menu--horizontal {
|
||||
border: none !important;
|
||||
/* background: #0f02 !important; */
|
||||
}
|
||||
|
||||
/* .el-menu--horizontal > .el-menu-item.is-active { */
|
||||
/* border-bottom-color: #0b58ff; */
|
||||
/* } */
|
||||
|
||||
.dialog-with-menu>>>.el-dialog__body {
|
||||
/* padding-top: 16px !important;
|
||||
padding-bottom: 16px !important; */
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.el-select,
|
||||
.el-cascader {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dialog-with-menu>>>.el-dialog__header {
|
||||
padding: 10px 20px 10px;
|
||||
/* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), white); */
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.at-right-top {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
ul.file-list,
|
||||
ul.file-list>li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.file-list {
|
||||
max-height: 20vh;
|
||||
overflow-y: auto;
|
||||
margin-top: 12px;
|
||||
/* width: 240px; */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
ul.file-list>li {
|
||||
border-radius: 4px;
|
||||
background-color: #edededd2;
|
||||
padding: 8px;
|
||||
margin-bottom: 2px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
ul.file-list>li:hover {
|
||||
background-color: #ededed;
|
||||
}
|
||||
|
||||
.file-operations {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.file-icon {
|
||||
margin-right: 8px;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
place-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
/* .image-preview-dialog {
|
||||
} */
|
||||
|
||||
.force-disabled {
|
||||
margin-top: 42px;
|
||||
}
|
||||
</style>
|
||||
@@ -5,8 +5,12 @@
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<div style="padding-top: 5px; padding-right: 38px;">
|
||||
<navbar-right :blackTitle='true'/>
|
||||
</div>
|
||||
|
||||
<!-- <div class="right-menu"> -->
|
||||
<!-- <template v-if="device!=='mobile'"> -->
|
||||
<!-- <search id="header-search" class="right-menu-item" /> -->
|
||||
|
||||
<!-- 站内信 -->
|
||||
@@ -18,27 +22,27 @@
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip> -->
|
||||
|
||||
</template>
|
||||
<!-- </template> -->
|
||||
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<!-- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper"> -->
|
||||
<!-- <img :src="avatar" class="user-avatar"> -->
|
||||
<span v-if="nickname" class="user-nickname">{{ nickname }}</span>
|
||||
<!-- <span v-if="nickname" class="user-nickname">{{ nickname }}</span>
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<router-link to="/user/profile">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
</router-link>
|
||||
</router-link> -->
|
||||
<!-- <el-dropdown-item @click.native="setting = true">
|
||||
<span>布局设置</span>
|
||||
</el-dropdown-item> -->
|
||||
<el-dropdown-item divided @click.native="logout">
|
||||
<!-- <el-dropdown-item divided @click.native="logout">
|
||||
<span>退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</el-dropdown> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -51,7 +55,8 @@ import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import NotifyMessage from '@/layout/components/Message'
|
||||
import {getPath} from "@/utils/ruoyi";
|
||||
// import {getPath} from "@/utils/ruoyi";
|
||||
import NavbarRight from './NavbarRight.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -61,7 +66,8 @@ export default {
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search,
|
||||
NotifyMessage
|
||||
NotifyMessage,
|
||||
NavbarRight
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
120
src/layout/components/NavbarRight.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
|
||||
<div class="home-icon" v-if='blackTitle'>
|
||||
<svg-icon icon-class="home" style="font-size: 24px; cursor: pointer;" @click="toHome"/>
|
||||
</div>
|
||||
<div class="time-msg">
|
||||
<div class="line1">{{timeZone}} {{topTime}}</div>
|
||||
<div class="line2">{{topDate}}</div>
|
||||
</div>
|
||||
<div class="base-msg">
|
||||
<div class="avatar">
|
||||
<el-dropdown>
|
||||
<img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" />
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item><svg-icon icon-class="helpbtn"/>帮助文档</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logout"><svg-icon icon-class="exitbtn"/>退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="use-msg">
|
||||
<div class="line1">{{nickname}}</div>
|
||||
<div class="line2">{{dept}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { getUser } from "@/api/system/user.js";
|
||||
import {getPath} from "@/utils/ruoyi";
|
||||
export default {
|
||||
name: 'navRight',
|
||||
data() {
|
||||
return {
|
||||
topDate: '',
|
||||
topTime: '',
|
||||
timeZone: '',
|
||||
timer: '',
|
||||
dept:' ',
|
||||
nickname: this.$store.getters.nickname
|
||||
}
|
||||
},
|
||||
props: {
|
||||
blackTitle: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserMsg()
|
||||
this.getTime()
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
getTime() {
|
||||
let _this = this
|
||||
this.timer = setInterval(function () {
|
||||
_this.topDate = moment().format('YYYY/MM/DD')
|
||||
let temp = moment().format('A-hh:mm').split('-')
|
||||
_this.timeZone = temp[0]
|
||||
_this.topTime = temp[1]
|
||||
}, 1000)
|
||||
},
|
||||
getUserMsg() {
|
||||
let id = this.$store.getters.userId
|
||||
getUser(id).then(res => {
|
||||
this.dept = res.data.dept ? res.data.dept.name : ''
|
||||
})
|
||||
},
|
||||
async logout() {
|
||||
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = getPath('/');
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
toHome() {
|
||||
this.$router.push({ path: "/" })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.right-msg {
|
||||
float: right;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
.time-msg {
|
||||
display: inline-block;
|
||||
margin-right: 30px;
|
||||
}
|
||||
.home-icon {
|
||||
display: inline-block;
|
||||
margin-right: 30px;
|
||||
vertical-align: top;
|
||||
padding-top: 7px;
|
||||
}
|
||||
.base-msg {
|
||||
display: inline-block;
|
||||
.avatar {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.use-msg {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.line1 {
|
||||
height: 19px;
|
||||
}
|
||||
.line2 {
|
||||
height: 19px;
|
||||
opacity: 0.65;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
96
src/layout/components/Sidebar/SidebarItem copy.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div v-if="!item.hidden">
|
||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
v-for="(child, index) in item.children"
|
||||
:key="child.path + index"
|
||||
:is-nest="true"
|
||||
:item="child"
|
||||
:base-path="resolvePath(child.path)"
|
||||
class="nest-menu"
|
||||
/>
|
||||
</el-submenu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import path from 'path'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
import Item from './Item'
|
||||
import AppLink from './Link'
|
||||
import FixiOSBug from './FixiOSBug'
|
||||
|
||||
export default {
|
||||
name: 'SidebarItem',
|
||||
components: { Item, AppLink },
|
||||
mixins: [FixiOSBug],
|
||||
props: {
|
||||
// route object
|
||||
item: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
isNest: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
basePath: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
this.onlyOneChild = null
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
hasOneShowingChild(children = [], parent) {
|
||||
if (!children) {
|
||||
children = [];
|
||||
}
|
||||
const showingChildren = children.filter(item => {
|
||||
if (item.hidden) {
|
||||
return false
|
||||
} else {
|
||||
// Temp set(will be used if only has one showing child)
|
||||
this.onlyOneChild = item
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
// When there is only one child router, the child router is displayed by default
|
||||
if (showingChildren.length === 1) {
|
||||
return true
|
||||
}
|
||||
|
||||
// Show parent if there are no child router to display
|
||||
if (showingChildren.length === 0) {
|
||||
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
},
|
||||
resolvePath(routePath) {
|
||||
if (isExternal(routePath)) {
|
||||
return routePath
|
||||
}
|
||||
if (isExternal(this.basePath)) {
|
||||
return this.basePath
|
||||
}
|
||||
return path.resolve(this.basePath, routePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
71
src/layout/components/Sidebar/index copy.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{ 'has-logo': showLogo }"
|
||||
:style="{
|
||||
backgroundColor:
|
||||
settings.sideTheme === 'theme-dark'
|
||||
? variables.menuBackground
|
||||
: variables.menuLightBackground,
|
||||
}">
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
:collapse="isCollapse"
|
||||
:background-color="
|
||||
settings.sideTheme === 'theme-dark'
|
||||
? variables.menuBackground
|
||||
: variables.menuLightBackground
|
||||
"
|
||||
:text-color="
|
||||
settings.sideTheme === 'theme-dark'
|
||||
? variables.menuColor
|
||||
: variables.menuLightColor
|
||||
"
|
||||
:unique-opened="true"
|
||||
active-text-color="#fff"
|
||||
:collapse-transition="false"
|
||||
mode="vertical">
|
||||
<!-- 根据 sidebarRouters 路由,生成菜单 -->
|
||||
<sidebar-item
|
||||
v-for="(route, index) in sidebarRouters"
|
||||
:key="route.path + index"
|
||||
:item="route"
|
||||
:base-path="route.path" />
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapState } from 'vuex';
|
||||
import Logo from './Logo';
|
||||
import SidebarItem from './SidebarItem';
|
||||
import variables from '@/assets/styles/variables.scss';
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
computed: {
|
||||
...mapState(['settings']),
|
||||
...mapGetters(['sidebarRouters', 'sidebar']),
|
||||
activeMenu() {
|
||||
const route = this.$route;
|
||||
const { meta, path } = route;
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu;
|
||||
}
|
||||
return path;
|
||||
},
|
||||
showLogo() {
|
||||
return this.$store.state.settings.sidebarLogo;
|
||||
},
|
||||
variables() {
|
||||
return variables;
|
||||
},
|
||||
isCollapse() {
|
||||
return !this.sidebar.opened;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -28,7 +28,7 @@
|
||||
mode="vertical">
|
||||
<!-- 根据 sidebarRouters 路由,生成菜单 -->
|
||||
<sidebar-item
|
||||
v-for="(route, index) in sidebarRouters"
|
||||
v-for="(route, index) in routeList"
|
||||
:key="route.path + index"
|
||||
:item="route"
|
||||
:base-path="route.path" />
|
||||
@@ -47,7 +47,12 @@ export default {
|
||||
components: { SidebarItem, Logo },
|
||||
computed: {
|
||||
...mapState(['settings']),
|
||||
...mapGetters(['sidebarRouters', 'sidebar']),
|
||||
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
|
||||
routeList() {
|
||||
// return [this.partList[this.choicepart]]
|
||||
// return [this.sidebarRouters[29]]
|
||||
return [this.sidebarRouters[this.choicepart]]
|
||||
},
|
||||
activeMenu() {
|
||||
const route = this.$route;
|
||||
const { meta, path } = route;
|
||||
|
||||