From 3735d5684865904858a8ace1b51b83cbd58a49f6 Mon Sep 17 00:00:00 2001
From: cwchen <1048842385@qq.com>
Date: Mon, 27 Oct 2025 14:47:51 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=96=B9=E6=A1=88=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/TableModel2/index.vue | 301 +++++++-----------
src/router/index.js | 15 +-
.../technical/components/LeftType.vue | 65 +++-
.../technical/components/RightTable.vue | 102 +++---
.../technical/components/TechnicalForm.vue | 15 +
.../technical/components/TypeForm.vue | 168 ++++++++++
.../technical/components/config.js | 24 +-
.../enterpriseLibrary/technical/index.vue | 8 +-
8 files changed, 443 insertions(+), 255 deletions(-)
create mode 100644 src/views/enterpriseLibrary/technical/components/TechnicalForm.vue
create mode 100644 src/views/enterpriseLibrary/technical/components/TypeForm.vue
diff --git a/src/components/TableModel2/index.vue b/src/components/TableModel2/index.vue
index 0ad55b5..bc39142 100644
--- a/src/components/TableModel2/index.vue
+++ b/src/components/TableModel2/index.vue
@@ -3,205 +3,106 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
-
-
- 重置
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+ 重置
+
-
-
+
+
-
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+ " v-if="indexNumShow" />
+
+
+
+
+
+
+
+ {{ scope.row[item.t_props] || '-' }}
+
-
- {{ scope.row[item.t_props] || '-' }}
+
+
+
+
+ -
+
-
-
-
-
-
- -
-
-
-
-
+
+
-
+
@@ -219,7 +120,7 @@ export default {
// 列表请求接口
requestApi: {
type: Function,
- default: () => function () {},
+ default: () => function () { },
},
// 列表配置项
columnsList: {
@@ -501,7 +402,7 @@ export default {
this.$set(setObj, 'unitName', res.data.unitName)
this.$set(setObj, 'typeName', res.data.name)
})
- .catch((err) => {})
+ .catch((err) => { })
for (let key in this.queryParams) {
this.$set(setObj, key, this.queryParams[key])
}
@@ -606,7 +507,7 @@ export default {
width: 98px;
height: 36px;
background: #1F72EA;
- box-shadow: 0px 4px 8px 0px rgba(51,135,255,0.5);
+ box-shadow: 0px 4px 8px 0px rgba(51, 135, 255, 0.5);
border-radius: 4px 4px 4px 4px;
color: #fff;
border: none;
@@ -615,7 +516,7 @@ export default {
&:hover {
background: #4A8BFF;
- box-shadow: 0px 6px 12px 0px rgba(51,135,255,0.6);
+ box-shadow: 0px 6px 12px 0px rgba(51, 135, 255, 0.6);
}
}
@@ -623,7 +524,7 @@ export default {
width: 98px;
height: 36px;
background: #FFFFFF;
- box-shadow: 0px 4px 8px 0px rgba(76,76,76,0.2);
+ box-shadow: 0px 4px 8px 0px rgba(76, 76, 76, 0.2);
border-radius: 4px 4px 4px 4px;
color: #333;
border: none;
@@ -632,7 +533,7 @@ export default {
&:hover {
background: #f5f5f5;
- box-shadow: 0px 6px 12px 0px rgba(76,76,76,0.3);
+ box-shadow: 0px 6px 12px 0px rgba(76, 76, 76, 0.3);
color: #40a9ff;
}
}
@@ -646,6 +547,26 @@ export default {
flex-direction: column;
}
+ .table-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ // margin-bottom: 16px;
+ padding-bottom: 12px;
+
+ .table-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ }
+
+ .table-actions {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ }
+ }
+
::v-deep .el-table {
width: 100%;
margin-bottom: 0;
diff --git a/src/router/index.js b/src/router/index.js
index 6ac85a9..bbfb0d0 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -289,7 +289,20 @@ export const dynamicRoutes = [
}
]
},
-
+ {
+ path: '/technicalAdd',
+ component: Layout,
+ hidden: true,
+ permissions: ['enterpriseLibrary:technical:add'],
+ children: [
+ {
+ path: 'index',
+ component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalForm'),
+ name: 'TechnicalAdd',
+ meta: { title: '新增方案', activeMenu: '/enterpriseLibrary/technical', noCache: true }
+ }
+ ]
+ },
]
// 防止连续点击多次路由报错
diff --git a/src/views/enterpriseLibrary/technical/components/LeftType.vue b/src/views/enterpriseLibrary/technical/components/LeftType.vue
index 5af2298..a44afa8 100644
--- a/src/views/enterpriseLibrary/technical/components/LeftType.vue
+++ b/src/views/enterpriseLibrary/technical/components/LeftType.vue
@@ -7,39 +7,54 @@
- {{ item.name }}
+ {{ item.technicalSolutionName }}
- 编辑
- 删除
+ 编辑
+ 删除
+
+
-
+
@@ -110,7 +147,7 @@ export default {
width: 121px;
height: 36px;
background: #1F72EA;
- box-shadow: 0px 4px 8px 0px rgba(51,135,255,0.5);
+ box-shadow: 0px 4px 8px 0px rgba(51, 135, 255, 0.5);
border-radius: 4px 4px 4px 4px;
color: #fff;
display: flex;
@@ -123,7 +160,7 @@ export default {
&:hover {
background: #4A8BFF;
- box-shadow: 0px 6px 12px 0px rgba(51,135,255,0.6);
+ box-shadow: 0px 6px 12px 0px rgba(51, 135, 255, 0.6);
}
}
diff --git a/src/views/enterpriseLibrary/technical/components/RightTable.vue b/src/views/enterpriseLibrary/technical/components/RightTable.vue
index 871bc20..ac44025 100644
--- a/src/views/enterpriseLibrary/technical/components/RightTable.vue
+++ b/src/views/enterpriseLibrary/technical/components/RightTable.vue
@@ -3,22 +3,27 @@
-
-
+
+ 数据列表
+
+
+ 新增
{{ data.dept.deptName || '--' }}
-
- 修改
+ 查看
-
+
+ 编辑
+
+
删除
@@ -33,59 +38,51 @@ import {
listUser,
delUser,
} from '@/api/system/user'
-
+import { encryptWithSM4 } from '@/utils/sm'
export default {
name: 'RightTableTechnical',
components: {
TableModel,
},
+ dicts: ['construction_nature', 'structural_form', 'basic_form'],
+ props: {
+ enterpriseId: {
+ type: String,
+ default: '0'
+ }
+ },
data() {
return {
formLabel,
columnsList,
listUser,
- title: "",
- isflag: false,
- isAdd: '',
- row: {},
- loading: false,
- treeDataList: [],
}
},
created() {
- this.initData();
-
+ // 将字典数据填充到表单配置的下拉选项中
+ if (Array.isArray(this.formLabel)) {
+ this.formLabel.forEach((item) => {
+ if (item.f_dict && this.dict && this.dict.type && this.dict.type[item.f_dict]) {
+ this.$set(item, 'f_selList', this.dict.type[item.f_dict])
+ }
+ })
+ }
},
methods: {
- async initData() {
- await getDeptSelectApi().then(res => {
- this.treeDataList = this.convertToVueTree(res.data);
- });
- const item = this.formLabel.find(item => item.f_model === 'roleId');
- await getRoleSelectApi().then(res => {
- res.data.forEach(item => {
- item.label = item.name;
- item.value = item.id;
- });
- this.$set(item, 'f_selList', res.data)
- });
- },
/** 新增按钮操作 */
handleAdd() {
- this.title = "新增";
- this.isAdd = 'add';
- this.isflag = true;
- },
- closeDialog() {
- this.isflag = false;
- },
- showColose() {
- this.isflag = false;
+ this.$router.push({
+ name: 'TechnicalAdd',
+ query: {
+ enterpriseId: encryptWithSM4(this.enterpriseId || '0')
+ }
+ })
},
+
/** 修改操作 */
handleUpdate(row) {
this.title = "修改";
@@ -135,4 +132,29 @@ export default {
overflow-y: auto;
}
}
+
+.add-btn {
+ width: 121px;
+ height: 36px;
+ background: #1F72EA;
+ box-shadow: 0px 4px 8px 0px rgba(51, 135, 255, 0.5);
+ border-radius: 4px 4px 4px 4px;
+ color: #fff;
+ border: none;
+ font-size: 14px;
+ transition: all 0.3s;
+
+ &:hover {
+ background: #4A8BFF;
+ box-shadow: 0px 6px 12px 0px rgba(51, 135, 255, 0.6);
+ }
+}
+
+.action-btn {
+ margin-right: 8px;
+
+ &:last-child {
+ margin-right: 0;
+ }
+}
diff --git a/src/views/enterpriseLibrary/technical/components/TechnicalForm.vue b/src/views/enterpriseLibrary/technical/components/TechnicalForm.vue
new file mode 100644
index 0000000..ceabf83
--- /dev/null
+++ b/src/views/enterpriseLibrary/technical/components/TechnicalForm.vue
@@ -0,0 +1,15 @@
+
+
+
新增方案
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/enterpriseLibrary/technical/components/TypeForm.vue b/src/views/enterpriseLibrary/technical/components/TypeForm.vue
new file mode 100644
index 0000000..d169250
--- /dev/null
+++ b/src/views/enterpriseLibrary/technical/components/TypeForm.vue
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/enterpriseLibrary/technical/components/config.js b/src/views/enterpriseLibrary/technical/components/config.js
index c5f909c..0ab0951 100644
--- a/src/views/enterpriseLibrary/technical/components/config.js
+++ b/src/views/enterpriseLibrary/technical/components/config.js
@@ -2,23 +2,33 @@ export const formLabel = [
{
isShow: false, // 是否展示label
f_type: 'ipt',
- f_label: '用户账号',
+ f_label: '方案名称',
f_model: 'userName',
f_max: 32,
},
{
isShow: false, // 是否展示label
- f_type: 'ipt',
- f_label: '手机号',
- f_model: 'phonenumber',
- f_max: 32,
+ f_type: 'sel',
+ f_label: '建设性质',
+ f_model: 'natureConstruction',
+ f_selList: [],
+ f_dict: 'nature_construction',
},
{
isShow: false, // 是否展示label
f_type: 'sel',
- f_label: '角色',
- f_model: 'roleId',
+ f_label: '结构形式',
+ f_model: 'structuralForm',
f_selList: [],
+ f_dict: 'structural_form',
+ },
+ {
+ isShow: false, // 是否展示label
+ f_type: 'sel',
+ f_label: '结构形式',
+ f_model: 'basicForm',
+ f_selList: [],
+ f_dict: 'basic_form',
},
]
diff --git a/src/views/enterpriseLibrary/technical/index.vue b/src/views/enterpriseLibrary/technical/index.vue
index f55b47c..bffcb1d 100644
--- a/src/views/enterpriseLibrary/technical/index.vue
+++ b/src/views/enterpriseLibrary/technical/index.vue
@@ -4,11 +4,11 @@
+ @category-command="handleCategoryCommand" :enterpriseId="enterpriseId" />
+ @edit="handleEdit" @delete="handleDelete" :enterpriseId="enterpriseId" />
@@ -18,6 +18,7 @@