优化
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
:file-type="['xls', 'xlsx']"
|
||||
:on-upload-success="handleSuccess"
|
||||
>
|
||||
<el-button type="primary" plain icon="Compass">导入</el-button>
|
||||
<el-button type="primary" plain icon="upload">导入</el-button>
|
||||
</file-upload>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -249,6 +249,7 @@ const initFormData: ProgressCategoryForm = {
|
||||
status: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
const labelTitle = ref('测试方阵');
|
||||
|
||||
const data = reactive<PageData<ProgressCategoryForm, ProgressCategoryQuery>>({
|
||||
form: { ...initFormData },
|
||||
@ -323,7 +324,8 @@ const getList = async () => {
|
||||
if (data) {
|
||||
progressCategoryList.value = data;
|
||||
progressCategoryOptions.value = [];
|
||||
const datas: ProgressCategoryOption = { id: 0, name: '顶级节点', children: [...data] };
|
||||
const datas: ProgressCategoryOption = { id: 0, name: '顶级节点', children: [{ id: id, children: [...data], name: labelTitle.value }] };
|
||||
// form.value.parentId = id;
|
||||
progressCategoryOptions.value.push(datas);
|
||||
console.log('🚀 ~ getList ~ progressCategoryOptions.value:', progressCategoryOptions.value);
|
||||
loading.value = false;
|
||||
@ -336,6 +338,7 @@ const getList = async () => {
|
||||
const handleSuccess = () => {
|
||||
console.log(111);
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 查询分项工程单价下拉树结构 */
|
||||
@ -355,6 +358,8 @@ const cancel = () => {
|
||||
};
|
||||
|
||||
const handleTabClick = (tab: any) => {
|
||||
console.log(tab);
|
||||
labelTitle.value = tab.props.label;
|
||||
const id = tab.props.name; // 实际上就是 item.id
|
||||
const current = tabList.value.find((item) => item.id === id);
|
||||
if (current.matrixStructureList && current.matrixStructureList.length > 0) {
|
||||
|
@ -106,7 +106,7 @@
|
||||
<el-input v-model="form.name" placeholder="请输入类别名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联数据" prop="workType">
|
||||
<el-select v-model="form.workType" placeholder="请选择关联数据">
|
||||
<el-select v-model="form.workType" clearable filterable placeholder="请选择关联数据">
|
||||
<el-option v-for="dict in progress_work_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
Reference in New Issue
Block a user