|
@@ -24,15 +24,22 @@
|
|
|
<!-- v-if="['template'].includes(attribute)"-->
|
|
|
<!-- ><span class="sheet-container-require">*</span>模板类型:</span-->
|
|
|
<!-- >-->
|
|
|
- <el-upload
|
|
|
- action
|
|
|
- :on-change="handleChange"
|
|
|
- :show-file-list="false"
|
|
|
- style=""
|
|
|
- :disabled="this.type=='view'?true:false"
|
|
|
- >
|
|
|
- <el-button :disabled="this.type=='view'?true:false" size="mini" type="primary">选择文件</el-button>
|
|
|
- </el-upload>
|
|
|
+ <div style="display: flex;
|
|
|
+ margin-right: 20px;
|
|
|
+ background: rgb(2, 135, 251);
|
|
|
+ padding: 2px;
|
|
|
+ border-radius: 4px;">
|
|
|
+ <el-upload
|
|
|
+ action
|
|
|
+ :http-request="request"
|
|
|
+ :on-change="handleChange"
|
|
|
+ :show-file-list="false"
|
|
|
+ :disabled="this.type=='view'?true:false"
|
|
|
+ >
|
|
|
+ <el-button :disabled="this.type=='view'?true:false" size="mini">选择文件</el-button>
|
|
|
+ </el-upload>
|
|
|
+ <span style="font-size: 12px;margin-right: 5px;line-height: 2">{{ fileListName }}</span>
|
|
|
+ </div>
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
@click="handleResave"
|
|
@@ -103,6 +110,10 @@ export default {
|
|
|
},
|
|
|
// 模板状态按钮判断
|
|
|
status: { type: String, default: "" },
|
|
|
+ mkdirId:{
|
|
|
+ type: String,
|
|
|
+ default:'',
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -204,9 +215,11 @@ export default {
|
|
|
// label: "按列",
|
|
|
// },
|
|
|
],
|
|
|
+ fileListName:'未选择任何文件'
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ request(){},
|
|
|
handleInit() {
|
|
|
console.log("-----id",this.id)
|
|
|
|
|
@@ -427,8 +440,9 @@ console.log("&&&&&&&&&&&&&sss:",state,templateName)
|
|
|
}
|
|
|
}, 1000);
|
|
|
},
|
|
|
- async handleChange(response) {
|
|
|
- this.handleCreate({ file: response.raw, type: "file" });
|
|
|
+ async handleChange(response, fileList) {
|
|
|
+ this.fileListName = fileList.slice(-1)[0].name;
|
|
|
+ this.handleCreate({ file: response.raw, type: "file" });
|
|
|
},
|
|
|
handleDownload() {
|
|
|
exportExcel(
|
|
@@ -842,6 +856,7 @@ console.log("&&&&&&&&&&&&&sss:",state,templateName)
|
|
|
templateName: workbook_name, //模板名称
|
|
|
templateUrl: "", //文件链接
|
|
|
state: this.state,
|
|
|
+ mkdirId: this.mkdirId
|
|
|
};
|
|
|
if("edit" ==this.type){
|
|
|
value.id=this.id;
|