|
@@ -4,17 +4,12 @@
|
|
|
<el-button type="primary" plain @click="addAbility(0)"><el-icon>
|
|
|
<Plus />
|
|
|
</el-icon>添加新功能</el-button>
|
|
|
- <el-button type="success" plain @click="lookTemplate">查看模板</el-button>
|
|
|
- <!-- <el-button type="primary" plain @click="upTemplate">上传模板</el-button> -->
|
|
|
- <el-upload style="display: inline-block;margin-left: 10px;" v-model:file-list="fileList" class="upload-demo"
|
|
|
+ <el-upload style="display: inline-block;margin: 0 10px;" v-model:file-list="fileList" class="upload-demo"
|
|
|
:show-file-list="false" :http-request="upTemplate" multiple :limit="1">
|
|
|
- <el-button type="primary" plain :disabled="upState">上传模板</el-button>
|
|
|
- <!-- <template #tip>
|
|
|
- <div class="el-upload__tip">
|
|
|
- jpg/png files with a size less than 500KB.
|
|
|
- </div>
|
|
|
- </template> -->
|
|
|
+ <el-button type="primary" plain :disabled="upState">Excel上传</el-button>
|
|
|
</el-upload>
|
|
|
+ <el-button type="success" plain @click="downloadFile">模板下载</el-button>
|
|
|
+
|
|
|
<el-table :data="tableData" style="width: 100%;height: calc(100vh - 600px);">
|
|
|
<el-table-column label="序号" width="100">
|
|
|
<template #default="scope">
|
|
@@ -102,7 +97,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
function downloadFile() {
|
|
|
- const fileUrl = '../../../assets/files/fanc_comp.xlsx'; // 修改为绝对路径
|
|
|
+ const fileUrl = '../../../../public/fanc_comp.xlsx'; // 修改为绝对路径
|
|
|
fetch(fileUrl)
|
|
|
.then(response => {
|
|
|
if (!response.ok) {
|
|
@@ -143,6 +138,12 @@ export default {
|
|
|
message: "上传成功!",
|
|
|
type: "success"
|
|
|
})
|
|
|
+ flow.getModelAndIed({//获取所有功能
|
|
|
+ model_id: modelIds.value - 0,
|
|
|
+ ied_type: iedTypes.value
|
|
|
+ }).then(res => {
|
|
|
+ tableData.value = res.data
|
|
|
+ })
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|