Commit 0e993ca7 authored by 仇晓婷's avatar 仇晓婷

下载模板

parent dcfd759a
<template>
<div>
<div class="document-add">
<Form ref="form" :model="entity" :rules="rules" :label-width="120">
<Row>
<Col span="18">
......@@ -164,10 +164,13 @@
</FormItem>
</Col>-->
<Col :span="24">
<FormItem :label="l('filePath')" prop="filePath">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<files ref="refFile" :parms="parms" files />
</FormItem>
<div class="xia-zai">
<FormItem :label="l('filePath')" prop="filePath">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<files ref="refFile" :parms="parms" files />
</FormItem>
<a href="#" @click="template" class="a-xiazai">下载模板</a>
</div>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
......@@ -350,6 +353,15 @@ export default {
handleClose() {
this.$emit("on-close");
},
template() {
// alert(this.treeId);
Api.getcategorytemplate({ cat: this.treeId }).then((r) => {
if (r.result) {
let url = r.result[0].url;
window.open(fileUrlDown + url, "_blank");
}
});
},
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
......@@ -399,4 +411,14 @@ export default {
cursor: pointer;
}
}
.document-add {
.xia-zai {
position: relative;
.a-xiazai {
position: absolute;
top: 7px;
left: 260px;
}
}
}
</style>
\ No newline at end of file
......@@ -30,4 +30,8 @@ export default {
batchstart(params) {
return Api.post(`${workflowUrl}/instance/batchstart`, params); //送审
},
getcategorytemplate(params){ //获取分类的模板
return Api.get(`${material}/documenttemplate/getcategorytemplate`,params);
},
}
\ No newline at end of file
......@@ -161,10 +161,13 @@
</FormItem>
</Col>-->
<Col :span="24">
<FormItem :label="l('filePath')" prop="filePath">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<files ref="refFile" :parms="parms" files />
</FormItem>
<div class="xia-zai">
<FormItem :label="l('filePath')" prop="filePath">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<files ref="refFile" :parms="parms" files />
</FormItem>
<a href="#" @click="template" class="a-xiazai">下载模板</a>
</div>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
......@@ -304,7 +307,7 @@ export default {
if (v) {
if (this.$refs.refFile.nameList.length > 0) {
this.entity.filePath = this.parms.eid;
this.entity.status = 1; //上传文件后状态变为工作中
this.entity.status = 1; //上传文件后状态变为工作中
} else {
this.entity.filePath = "";
this.entity.status = 0; //默认私有
......@@ -325,6 +328,15 @@ export default {
}
});
},
template() {
// alert(this.treeId);
Api.getcategorytemplate({ cat: this.treeId }).then((r) => {
if (r.result) {
let url = r.result[0].url;
window.open(fileUrlDown + url, "_blank");
}
});
},
handleClose() {
this.$emit("on-close");
},
......@@ -363,4 +375,12 @@ export default {
cursor: pointer;
}
}
.xia-zai {
position: relative;
.a-xiazai {
position: absolute;
top: 7px;
left: 260px;
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment