|
@@ -32,7 +32,7 @@
|
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
@click="handleAdd"
|
|
|
- v-hasPermi="['document:techparam:add']"
|
|
|
|
|
|
|
+ v-hasPermi="['document:tech:add']"
|
|
|
>新增
|
|
>新增
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -50,19 +50,18 @@
|
|
|
|
|
|
|
|
<el-table
|
|
<el-table
|
|
|
v-if="refreshTable"
|
|
v-if="refreshTable"
|
|
|
- :data="menuList"
|
|
|
|
|
|
|
+ :data="techParamList"
|
|
|
row-key="id"
|
|
row-key="id"
|
|
|
size="small"
|
|
size="small"
|
|
|
:default-expand-all="isExpandAll"
|
|
:default-expand-all="isExpandAll"
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
|
<el-table-column prop="name" label="参数名称" :show-overflow-tooltip="true" width="160"></el-table-column>
|
|
<el-table-column prop="name" label="参数名称" :show-overflow-tooltip="true" width="160"></el-table-column>
|
|
|
<el-table-column prop="categoryName" label="所属分类"></el-table-column>
|
|
<el-table-column prop="categoryName" label="所属分类"></el-table-column>
|
|
|
- <el-table-column prop="perms" label="产品名称"></el-table-column>
|
|
|
|
|
- <el-table-column prop="component" label="组件路径"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="productName" label="产品名称"></el-table-column>
|
|
|
<el-table-column prop="updateUserName" label="修改人"/>
|
|
<el-table-column prop="updateUserName" label="修改人"/>
|
|
|
- <el-table-column label="修改时间" align="center" prop="createTime">
|
|
|
|
|
|
|
+ <el-table-column label="修改时间" align="center" prop="updateTime">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
|
|
|
|
+ <span>{{ parseTime(scope.row.updateTime) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
@@ -72,15 +71,15 @@
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['document:techparam:edit']"
|
|
|
|
|
|
|
+ v-hasPermi="['document:tech:edit']"
|
|
|
>修改
|
|
>修改
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-view"
|
|
icon="el-icon-view"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
|
- v-hasPermi="['document:techparam:query']"
|
|
|
|
|
|
|
+ @click="handleView(scope.row)"
|
|
|
|
|
+ v-hasPermi="['document:tech:query']"
|
|
|
>查看
|
|
>查看
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -107,7 +106,7 @@
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="所属分类" prop="categoryId">
|
|
<el-form-item label="所属分类" prop="categoryId">
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="queryParams.categoryId"
|
|
|
|
|
|
|
+ v-model="form.categoryId"
|
|
|
clearable
|
|
clearable
|
|
|
style="width: 240px">
|
|
style="width: 240px">
|
|
|
<el-option v-for="item in categoryList" :key="item.id" :label="item.categoryName" :value="item.id"/>
|
|
<el-option v-for="item in categoryList" :key="item.id" :label="item.categoryName" :value="item.id"/>
|
|
@@ -120,7 +119,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
- <el-form-item label="参数详情" prop="path">
|
|
|
|
|
|
|
+ <el-form-item label="参数详情">
|
|
|
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" @click="addChild">添加</el-button>
|
|
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" @click="addChild">添加</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-card class="form-child" shadow="always" v-for="(child,index) in form.children" :key="index">
|
|
<el-card class="form-child" shadow="always" v-for="(child,index) in form.children" :key="index">
|
|
@@ -147,7 +146,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {listMenu, getMenu, delMenu, addMenu, updateMenu} from "@/api/system/menu";
|
|
|
|
|
|
|
+import {listTechParam, getTechParam, delTechParam, addTechParam, updateTechParam} from "@/api/document/techparam";
|
|
|
import {getCategoryList} from "@/api/task/category";
|
|
import {getCategoryList} from "@/api/task/category";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -157,7 +156,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
categoryList: [],
|
|
categoryList: [],
|
|
|
// 参数表格树数据
|
|
// 参数表格树数据
|
|
|
- menuList: [],
|
|
|
|
|
|
|
+ techParamList: [],
|
|
|
// 参数树选项
|
|
// 参数树选项
|
|
|
menuOptions: [],
|
|
menuOptions: [],
|
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
@@ -198,8 +197,8 @@ export default {
|
|
|
getCategoryList().then(res => {
|
|
getCategoryList().then(res => {
|
|
|
this.categoryList = res.data;
|
|
this.categoryList = res.data;
|
|
|
})
|
|
})
|
|
|
- listMenu(this.queryParams).then(response => {
|
|
|
|
|
- this.menuList = this.handleTree(response.data, "id");
|
|
|
|
|
|
|
+ listTechParam(this.queryParams).then(res => {
|
|
|
|
|
+ this.techParamList = this.handleTree(res.data, "id");
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
@@ -213,7 +212,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 查询参数下拉树结构 */
|
|
/** 查询参数下拉树结构 */
|
|
|
getTreeSelect() {
|
|
getTreeSelect() {
|
|
|
- listMenu().then(response => {
|
|
|
|
|
|
|
+ listTechParam().then(response => {
|
|
|
this.menuOptions = [];
|
|
this.menuOptions = [];
|
|
|
const menu = {id: 0, menuName: '主类目', children: []};
|
|
const menu = {id: 0, menuName: '主类目', children: []};
|
|
|
menu.children = this.handleTree(response.data, "id");
|
|
menu.children = this.handleTree(response.data, "id");
|
|
@@ -285,24 +284,34 @@ export default {
|
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
this.reset();
|
|
|
this.getTreeSelect();
|
|
this.getTreeSelect();
|
|
|
- getMenu(row.id).then(response => {
|
|
|
|
|
|
|
+ getTechParam(row.id).then(response => {
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
this.title = "修改参数";
|
|
this.title = "修改参数";
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 查看按钮操作 */
|
|
|
|
|
+ handleView(row) {
|
|
|
|
|
+ this.reset();
|
|
|
|
|
+ getTechParam(row.id).then(response => {
|
|
|
|
|
+ this.form = response.data;
|
|
|
|
|
+ this.open = true;
|
|
|
|
|
+ this.title = "参数详情";
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
+ console.log(this.form);
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
if (this.form.id != undefined) {
|
|
if (this.form.id != undefined) {
|
|
|
- updateMenu(this.form).then(response => {
|
|
|
|
|
|
|
+ updateTechParam(this.form).then(response => {
|
|
|
this.$message.success("修改成功");
|
|
this.$message.success("修改成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.getList();
|
|
this.getList();
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- addMenu(this.form).then(response => {
|
|
|
|
|
|
|
+ addTechParam(this.form).then(response => {
|
|
|
this.$message.success("新增成功");
|
|
this.$message.success("新增成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.getList();
|
|
this.getList();
|
|
@@ -310,16 +319,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- /** 删除按钮操作 */
|
|
|
|
|
- handleDelete(row) {
|
|
|
|
|
- this.$confirm('是否确认删除名称为"' + row.menuName + '"的数据项?').then(() => {
|
|
|
|
|
- return delMenu(row.id);
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.getList();
|
|
|
|
|
- this.$message.success("删除成功");
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- });
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|