技术方案库

This commit is contained in:
cwchen 2025-10-27 14:47:51 +08:00
parent f0f9b2d58a
commit 3735d56848
8 changed files with 443 additions and 255 deletions

View File

@ -3,205 +3,106 @@
<div>
<!-- 表单搜索 -->
<el-card v-show="showSearch" class="search-card">
<el-form
:inline="true"
ref="queryFormRef"
:rules="formRules"
:model="queryParams"
label-width="auto"
>
<el-form-item
:key="v"
:prop="item.f_model"
v-for="(item, v) in formLabel"
:label="item.isShow ? item.f_label : ''"
>
<el-input
clearable
:maxlength="item.f_max || 50"
v-if="item.f_type === 'ipt'"
v-model.trim="queryParams[item.f_model]"
:placeholder="`请输入${item.f_label}`"
:style="{ width: item.f_width || '180px' }"
/>
<el-select
clearable
filterable
v-if="item.f_type === 'sel'"
v-model="queryParams[item.f_model]"
:placeholder="`请选择${item.f_label}`"
:style="{ width: item.f_width || '180px' }"
>
<el-option
:key="v"
:label="sel.label"
:value="sel.value"
v-for="(sel, v) in item.f_selList"
/>
</el-select>
<el-cascader
clearable
style="width: 180px"
:show-all-levels="false"
:props="item.optionProps"
:options="item.f_selList"
v-if="item.f_type === 'selCasAdd'"
v-model="queryParams[item.f_model]"
@change="
handleCasAdd(
$event,
item.f_model,
cascadeFunc,
extraTableProp,
)
"
/>
<el-cascader
style="width: 180px"
:show-all-levels="false"
:options="item.f_selList"
:props="item.optionProps"
v-if="item.f_type === 'selCas'"
v-model="queryParams[item.f_model]"
@change="handleCas($event, item.f_model)"
/>
<el-date-picker
type="date"
style="width: 240px"
value-format="yyyy-MM-dd"
v-if="item.f_type === 'date'"
v-model="queryParams[item.f_model]"
:placeholder="`请选择${item.f_label}`"
/>
<el-date-picker
type="daterange"
style="width: 240px"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-if="item.f_type === 'dateRange'"
v-model="queryParams[item.f_model]"
@change="onChangeTime($event, item.dateType)"
:picker-options="pickerOptions"
/>
<el-input-number
:min="0"
style="width: 240px"
v-if="item.f_type === 'num'"
v-model="queryParams[item.f_model]"
/>
</el-form-item>
<!-- 自定义搜索插槽父组件可自行插入 el-form-item -->
<slot name="form" :queryParams="queryParams"></slot>
<el-form-item v-if="showBtnCrews">
<el-button
v-if="showQueryButtons"
class="query-btn"
@click="handleQuery"
>
查询
</el-button>
<el-button
v-if="showQueryButtons"
class="reset-btn"
@click="resetQuery"
>
重置
</el-button>
<el-form :inline="true" ref="queryFormRef" :rules="formRules" :model="queryParams" label-width="auto">
<el-form-item :key="v" :prop="item.f_model" v-for="(item, v) in formLabel"
:label="item.isShow ? item.f_label : ''">
<el-input clearable :maxlength="item.f_max || 50" v-if="item.f_type === 'ipt'"
v-model.trim="queryParams[item.f_model]" :placeholder="`请输入${item.f_label}`"
:style="{ width: item.f_width || '180px' }" />
<el-select clearable filterable v-if="item.f_type === 'sel'" v-model="queryParams[item.f_model]"
:placeholder="`请选择${item.f_label}`" :style="{ width: item.f_width || '180px' }">
<el-option :key="v" :label="sel.label" :value="sel.value" v-for="(sel, v) in item.f_selList" />
</el-select>
<el-cascader clearable style="width: 180px" :show-all-levels="false" :props="item.optionProps"
:options="item.f_selList" v-if="item.f_type === 'selCasAdd'" v-model="queryParams[item.f_model]"
@change="
handleCasAdd(
$event,
item.f_model,
cascadeFunc,
extraTableProp,
)
" />
<el-cascader style="width: 180px" :show-all-levels="false" :options="item.f_selList"
:props="item.optionProps" v-if="item.f_type === 'selCas'" v-model="queryParams[item.f_model]"
@change="handleCas($event, item.f_model)" />
<el-date-picker type="date" style="width: 240px" value-format="yyyy-MM-dd"
v-if="item.f_type === 'date'" v-model="queryParams[item.f_model]"
:placeholder="`请选择${item.f_label}`" />
<el-date-picker type="daterange" style="width: 240px" range-separator="" value-format="yyyy-MM-dd"
start-placeholder="开始日期" end-placeholder="结束日期" v-if="item.f_type === 'dateRange'"
v-model="queryParams[item.f_model]" @change="onChangeTime($event, item.dateType)"
:picker-options="pickerOptions" />
<el-input-number :min="0" style="width: 240px" v-if="item.f_type === 'num'"
v-model="queryParams[item.f_model]" />
</el-form-item>
<!-- 自定义搜索插槽父组件可自行插入 el-form-item -->
<slot name="form" :queryParams="queryParams"></slot>
<el-form-item v-if="showBtnCrews">
<el-button v-if="showQueryButtons" class="query-btn" @click="handleQuery">
查询
</el-button>
<el-button v-if="showQueryButtons" class="reset-btn" @click="resetQuery">
重置
</el-button>
<slot name="btn" :queryParams="queryParams"></slot>
</el-form-item>
<slot name="btn" :queryParams="queryParams"></slot>
</el-form-item>
</el-form>
</el-card>
<!-- 按钮集群 -->
<el-row class="btn-container">
<ToolbarModel
v-if="showRightTools"
:columns="columnCheckList"
@queryTable="getTableList"
:showSearch.sync="showSearch"
:handleShow.sync="handleShow"
:indexNumShow.sync="indexNumShow"
:selectionShow.sync="selectionShow"
:isSelectShow="isSelectShow"
:showOperation="showOperation"
/>
<ToolbarModel v-if="showRightTools" :columns="columnCheckList" @queryTable="getTableList"
:showSearch.sync="showSearch" :handleShow.sync="handleShow" :indexNumShow.sync="indexNumShow"
:selectionShow.sync="selectionShow" :isSelectShow="isSelectShow" :showOperation="showOperation" />
</el-row>
<!-- 表格 -->
<el-card class="table-card" :style="tableCardStyle">
<el-table
ref="tableRef"
:data="tableList"
style="width: 100%"
v-loading="loading"
select-on-indeterminate
@selection-change="handleSelectionChange"
>
<el-table-column
width="45"
align="center"
type="selection"
:selectable="selectable"
v-if="selectionShow && isSelectShow"
/>
<el-table-column
fixed
width="55"
label="序号"
type="index"
align="center"
:index="
(index) =>
<!-- 表格头部插槽 -->
<div class="table-header" v-if="$slots.tableTitle || $slots.tableActions">
<div class="table-title">
<slot name="tableTitle"></slot>
</div>
<div class="table-actions">
<slot name="tableActions"></slot>
</div>
</div>
<el-table ref="tableRef" :data="tableList" style="width: 100%" v-loading="loading" select-on-indeterminate
@selection-change="handleSelectionChange">
<el-table-column width="45" align="center" type="selection" :selectable="selectable"
v-if="selectionShow && isSelectShow" />
<el-table-column fixed width="55" label="序号" type="index" align="center" :index="(index) =>
(queryParams.pageNum - 1) * queryParams.pageSize +
index +
1
"
v-if="indexNumShow"
/>
<el-table-column
:key="v"
align="center"
:label="item.t_label"
:prop="item.t_props"
:width="item.t_width"
show-overflow-tooltip
v-for="(item, v) in tableColumCheckProps"
>
<template slot-scope="scope">
<!-- 判断当前列数据是否需要使用插槽的数据 -->
<template v-if="item.t_slot">
<slot :data="scope.row" :name="item.t_slot"></slot>
" v-if="indexNumShow" />
<el-table-column :key="v" align="center" :label="item.t_label" :prop="item.t_props"
:width="item.t_width" show-overflow-tooltip v-for="(item, v) in tableColumCheckProps">
<template slot-scope="scope">
<!-- 判断当前列数据是否需要使用插槽的数据 -->
<template v-if="item.t_slot">
<slot :data="scope.row" :name="item.t_slot"></slot>
</template>
<template v-else>
{{ scope.row[item.t_props] || '-' }}
</template>
</template>
<template v-else>
{{ scope.row[item.t_props] || '-' }}
</el-table-column>
<el-table-column align="center" label="操作" :width="handleColWidth" :show-overflow-tooltip="false"
fixed="right" v-if="handleShow && showOperation">
<template slot-scope="{ row }">
<div class="optionDivRef">
<slot :data="row" name="handle">-</slot>
</div>
</template>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
:width="handleColWidth"
:show-overflow-tooltip="false"
fixed="right"
v-if="handleShow && showOperation"
>
<template slot-scope="{ row }">
<div class="optionDivRef">
<slot :data="row" name="handle">-</slot>
</div>
</template>
</el-table-column>
</el-table>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination
:total="total"
@pagination="getTableList"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
/>
<pagination :total="total" @pagination="getTableList" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" />
</el-card>
</div>
</template>
@ -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;

View File

@ -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 }
}
]
},
]
// 防止连续点击多次路由报错

View File

@ -7,39 +7,54 @@
<div v-for="item in categoryList" :key="item.id" class="category-item"
:class="{ active: activeCategory === item.id }" @click="handleCategoryClick(item.id)">
<i class="el-icon-folder" style="margin-right: 8px; color: #666;"></i>
<span class="category-name">{{ item.name }}</span>
<span class="category-name">{{ item.technicalSolutionName }}</span>
<el-dropdown trigger="click" @command="handleCategoryCommand">
<span class="el-dropdown-link">
<i class="el-icon-more"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{ type: 'edit', id: item.id }">编辑</el-dropdown-item>
<el-dropdown-item :command="{ type: 'delete', id: item.id }">删除</el-dropdown-item>
<el-dropdown-item :command="{ type: 'edit', raw: item }">编辑</el-dropdown-item>
<el-dropdown-item :command="{ type: 'delete', raw: item }">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<!-- 添加方案类型弹窗 -->
<TypeForm ref="typeForm" v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
@closeDialog="closeDialog" :width="600" />
</el-card>
</template>
</template>
<script>
import TypeForm from './TypeForm.vue'
export default {
name: 'LeftTypeTechnical',
components: {
TypeForm
},
props: {
value: {
type: String,
default: ''
},
enterpriseId: {
type: String,
default: '0'
}
},
data() {
return {
activeCategory: 'dev',
categoryList: [
{ id: 'substation', name: '变电站' },
{ id: 'swapping', name: '换电站' },
{ id: 'line', name: '线路' },
{ id: 'commitment', name: '对招标人项目通过评价审核验收的承诺' },
]
{ id: 'substation', technicalSolutionName: '变电站' },
{ id: 'swapping', technicalSolutionName: '换电站' },
{ id: 'line', technicalSolutionName: '线路' },
{ id: 'commitment', technicalSolutionName: '对招标人项目通过评价审核验收的承诺' },
],
title: "",
isflag: false,
isAdd: '',
row: {},
}
},
watch: {
@ -55,16 +70,38 @@ export default {
}
},
methods: {
/**新增方案类型 */
handleAddCategory() {
this.$emit('add-category')
this.title = "新增方案类型";
this.isAdd = 'add';
this.row = {};
this.isflag = true;
},
handleCategoryClick(id) {
this.activeCategory = id
this.$emit('change', id)
},
handleCategoryCommand(command) {
this.$emit('category-command', command)
}
if (command.type === 'edit') {
this.handleEditCategory(command.raw)
} else if (command.type === 'delete') {
this.$emit('category-command', command)
}
},
/**编辑方案类型 */
handleEditCategory(raw) {
console.log(raw);
this.title = "编辑方案类型";
this.isAdd = 'edit';
this.row = { ...raw };
this.isflag = true;
},
closeDialog() {
this.isflag = false;
},
handleQuery() {
// this.$refs.dataClassTableRef.getTableList()
},
}
}
</script>
@ -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);
}
}

View File

@ -3,22 +3,27 @@
<div class="app-container">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="false" ref="userTableRef"
:columnsList="columnsList" :request-api="listUser">
<template slot="btn">
<!-- <el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['system:user:add']"
@click="handleAdd">
新增
</el-button> -->
<template slot="tableTitle">
<h3>数据列表</h3>
</template>
<template slot="tableActions">
<el-button @click="handleAdd" v-hasPermi="['enterpriseLibrary:technical:add']" class="add-btn"><i
class="el-icon-plus"></i> 新增</el-button>
</template>
<template slot="deptName" slot-scope="{ data }">
<span>{{ data.dept.deptName || '--' }}</span>
</template>
<template slot="handle" slot-scope="{ data }">
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['system:user:edit']"
<el-button type="text" v-hasPermi="['enterpriseLibrary:technical:detail']" class="action-btn"
@click="handleUpdate(data)">
修改
查看
</el-button>
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['system:user:remove']"
@click="handleDelete(data)" v-if="!data.admin">
<el-button type="text" v-hasPermi="['enterpriseLibrary:technical:edit']" class="action-btn"
style="color: #EAA819;" @click="handleUpdate(data)">
编辑
</el-button>
<el-button type="text" v-hasPermi="['enterpriseLibrary:technical:del']" class="action-btn"
style="color: #DB3E29;" @click="handleDelete(data)">
删除
</el-button>
</template>
@ -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;
}
}
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
<h1>新增方案</h1>
</div>
</template>
<script>
export default {
name: 'TechnicalForm',
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,168 @@
<template>
<!-- 小型弹窗用于完成删除保存等操作 -->
<el-dialog class="l-dialog" :class="lDialog" :title="title" :visible.sync="dialogVisible" :showClose="true"
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
<div>
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
<el-form-item label="方案名称" prop="technicalSolutionName">
<el-input class="form-item" v-model="form.technicalSolutionName" clearable show-word-limit
placeholder="请输入方案名称" maxlength="32"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" class="search-btn" :disabled="disabled"
@click="submitForm('ruleForm')">确认</el-button>
<el-button class="clear-btn" @click="handleClose" :disabled="disabled">取消</el-button>
</span>
</el-dialog>
</template>
<script>
import _ from 'lodash'
export default {
name: "TypeForm",
props: ["width", "rowData", "title", "disabled", "isAdd"],
data() {
return {
lDialog: this.width > 500 ? "w700" : "w500",
dialogVisible: true,
isDisabled: true,
form: {
id: null,
technicalSolutionName: '',
},
rules: {
technicalSolutionName: [
{ required: true, message: '方案名称不能为空', trigger: 'blur' }
],
},
};
},
watch: {
isAdd: {
handler(newVal) {
if (newVal === 'edit') {
this.initFormData();
}
},
immediate: true,
},
},
methods: {
/** 初始化表单数据 */
initFormData() {
if (this.isAdd === 'edit' && this.rowData) {
//
this.form = {
id: this.rowData.id,
technicalSolutionName: this.rowData.technicalSolutionName || '',
};
}
},
/*关闭弹窗 */
handleClose() {
this.dialogVisible = false;
this.$emit("closeDialog");
},
/**确认弹窗 */
sureBtnClick() {
this.dialogVisible = false;
this.$emit("closeDialog");
},
/**重置表单*/
reset() {
this.form = {
id: null,
pid: null,
dataTypeName: '',
remark: '',
};
this.resetForm("ruleForm");
},
handleReuslt(res) {
this.$modal.msgSuccess(res.msg);
this.reset();
this.$emit('handleQuery');
this.handleClose();
},
/**验证 */
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
//
this.loading = this.$loading({
lock: true,
text: "数据提交中,请稍候...",
background: 'rgba(0,0,0,0.5)',
target: this.$el.querySelector('.el-dialog') || document.body
})
let params = _.cloneDeep(this.form);
if (this.isAdd === 'add') {
addDataClassAPI(params).then(res => {
this.loading.close();
if (res.code === 200) {
this.handleReuslt(res);
} else {
this.$modal.msgError(res.msg);
}
}).catch(error => {
this.loading.close();
this.$modal.msgError(this.errorMsg(error));
});
} else {
updateDataClassAPI(params).then(res => {
this.loading.close();
if (res.code === 200) {
this.handleReuslt(res);
} else {
this.$modal.msgError(res.msg);
}
}).catch(error => {
this.loading.close();
this.$modal.msgError(this.errorMsg(error));
});
}
}
});
},
}
};
</script>
<style lang="scss" scoped>
.w700 ::v-deep .el-dialog {
width: 700px;
font-family: Source Han Sans CN, Source Han Sans CN;
}
.w500 ::v-deep .el-dialog {
width: 500px;
font-family: Source Han Sans CN, Source Han Sans CN;
}
.w500 ::v-deep .el-dialog__header,
.w700 ::v-deep .el-dialog__header {
.el-dialog__title {
font-size: 16px;
}
}
.yxq .el-range-separator {
margin-right: 7px !important;
}
.el-date-editor--daterange.el-input__inner {
width: 260px;
}
.form-item {
width: 100%;
}
.select-style {
display: flex;
justify-content: space-between;
}
</style>

View File

@ -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',
},
]

View File

@ -4,11 +4,11 @@
<el-row>
<el-col :span="5" class="left-col">
<LeftType :value="activeCategory" @change="handleCategoryChange" @add-category="handleAddCategory"
@category-command="handleCategoryCommand" />
@category-command="handleCategoryCommand" :enterpriseId="enterpriseId" />
</el-col>
<el-col :span="19" class="right-col">
<RightTable :category-id="activeCategory" @add-scheme="handleAddScheme" @view="handleView"
@edit="handleEdit" @delete="handleDelete" />
@edit="handleEdit" @delete="handleDelete" :enterpriseId="enterpriseId" />
</el-col>
</el-row>
</div>
@ -18,6 +18,7 @@
<script>
import LeftType from './components/LeftType.vue'
import RightTable from './components/RightTable.vue'
import { decryptWithSM4 } from '@/utils/sm'
export default {
name: 'Technical',
@ -27,7 +28,8 @@ export default {
},
data() {
return {
activeCategory: 'dev'
activeCategory: 'dev',
enterpriseId: decryptWithSM4(this.$route.query.enterpriseId),
}
},
methods: {