Commit 83e1467f authored by 罗超's avatar 罗超
parents 6132de28 b93ba9b2
......@@ -57,8 +57,7 @@
<p v-if="d.w">{{d.w.CreateName}} 提交于 {{item.CreateDate}}</p>
<div class="cont">{{item.Content}}</div>
<div class="attach">
附件:无
<!--<a href="http://baidu.com" target="_blank"></a>-->
附件:<span @click="openFile(item.Attach)" style="cursor: pointer;">{{item.Attach!=="" ? item.Attach : '无'}}</span>
</div>
</el-card>
</div>
......@@ -107,8 +106,6 @@
<el-col :span="1"> 当前进度: </el-col>
<el-col :span="4"><el-slider v-model="progree" :min="d.w.Progree" :max="100" :step="1"></el-slider></el-col>
</el-row>
</div>
<div style="margin-bottom:10px">
<el-input
......@@ -119,6 +116,21 @@
v-model="textarea2">
</el-input>
</div>
<div style="margin-bottom:10px;width: 29%;">
<el-upload
class="upload-demo"
drag
:http-request="uploadFileBtn"
:multiple="true"
:show-file-list="true"
:on-preview="previewFile"
:on-remove="removeFile"
:limit="1"
action="">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</div>
<div slot="footer" class="dialog-footer">
<button
class="normalBtn"
......@@ -128,6 +140,9 @@
</div>
</fieldset>
</div>
<viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
<img v-for="src in images" :src="src" :key="src">
</viewer>
</div>
</template>
......@@ -141,7 +156,14 @@ export default {
isUpdate:false,
textarea:'',
textarea2:'',
progree:0
progree:0,
fileList: [],
attach: '',
imageOptions:{
navbar:false,
title:false
},
images: [],
};
},
mounted() {
......@@ -151,6 +173,36 @@ export default {
this.init(id);
},
methods: {
openFile(file){
if (file) {
window.open(file)
}
},
inited (viewer){
this.$viewer = viewer
},
removeFile(e){
this.attach = ''
},
previewFile(e){
const link = document.createElement('a');
let _loadUrl=this.domainManager().DomainUrl
let str = window.location.href
link.href = this.attach
document.body.appendChild(link);
link.click();
},
uploadFileBtn(file) {
//上传
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
this.attach = this.domainManager().ViittoFileUrl + x.data.FilePath
this.$message.success(this.$t('tips.scchenggong'))
});
},
init(id) {
this.apipost(
"user_post_GetWorkDetails",
......@@ -177,7 +229,7 @@ export default {
pid:this.$route.query.id,
content:this.textarea2,
progree:this.progree,
attach:""
attach: this.attach
},
res => {
if (res.data.resultCode == 1) {
......
......@@ -83,6 +83,7 @@
:value="$t('pub.searchBtn')"
@click="getList();resetPageIndex()"
/>
<button class="normalBtn" @click="exportFile()">导出</button>
</li>
</ul>
</div>
......@@ -261,6 +262,11 @@ export default {
//this.getEmployee();
},
methods: {
exportFile(){
this.apipost('', {}, r=>{
})
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
......
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