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

下载模板

parent dcfd759a
<template> <template>
<div> <div class="document-add">
<Form ref="form" :model="entity" :rules="rules" :label-width="120"> <Form ref="form" :model="entity" :rules="rules" :label-width="120">
<Row> <Row>
<Col span="18"> <Col span="18">
...@@ -164,10 +164,13 @@ ...@@ -164,10 +164,13 @@
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<div class="xia-zai">
<FormItem :label="l('filePath')" prop="filePath"> <FormItem :label="l('filePath')" prop="filePath">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> --> <!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<files ref="refFile" :parms="parms" files /> <files ref="refFile" :parms="parms" files />
</FormItem> </FormItem>
<a href="#" @click="template" class="a-xiazai">下载模板</a>
</div>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
...@@ -350,6 +353,15 @@ export default { ...@@ -350,6 +353,15 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); 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) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
...@@ -399,4 +411,14 @@ export default { ...@@ -399,4 +411,14 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.document-add {
.xia-zai {
position: relative;
.a-xiazai {
position: absolute;
top: 7px;
left: 260px;
}
}
}
</style> </style>
\ No newline at end of file
...@@ -30,4 +30,8 @@ export default { ...@@ -30,4 +30,8 @@ export default {
batchstart(params) { batchstart(params) {
return Api.post(`${workflowUrl}/instance/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 @@ ...@@ -161,10 +161,13 @@
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<div class="xia-zai">
<FormItem :label="l('filePath')" prop="filePath"> <FormItem :label="l('filePath')" prop="filePath">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> --> <!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<files ref="refFile" :parms="parms" files /> <files ref="refFile" :parms="parms" files />
</FormItem> </FormItem>
<a href="#" @click="template" class="a-xiazai">下载模板</a>
</div>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
...@@ -325,6 +328,15 @@ export default { ...@@ -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() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
...@@ -363,4 +375,12 @@ export default { ...@@ -363,4 +375,12 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.xia-zai {
position: relative;
.a-xiazai {
position: absolute;
top: 7px;
left: 260px;
}
}
</style> </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