Commit 83e1467f authored by 罗超's avatar 罗超
parents 6132de28 b93ba9b2
...@@ -57,8 +57,7 @@ ...@@ -57,8 +57,7 @@
<p v-if="d.w">{{d.w.CreateName}} 提交于 {{item.CreateDate}}</p> <p v-if="d.w">{{d.w.CreateName}} 提交于 {{item.CreateDate}}</p>
<div class="cont">{{item.Content}}</div> <div class="cont">{{item.Content}}</div>
<div class="attach"> <div class="attach">
附件:无 附件:<span @click="openFile(item.Attach)" style="cursor: pointer;">{{item.Attach!=="" ? item.Attach : '无'}}</span>
<!--<a href="http://baidu.com" target="_blank"></a>-->
</div> </div>
</el-card> </el-card>
</div> </div>
...@@ -107,8 +106,6 @@ ...@@ -107,8 +106,6 @@
<el-col :span="1"> 当前进度: </el-col> <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-col :span="4"><el-slider v-model="progree" :min="d.w.Progree" :max="100" :step="1"></el-slider></el-col>
</el-row> </el-row>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<el-input <el-input
...@@ -119,6 +116,21 @@ ...@@ -119,6 +116,21 @@
v-model="textarea2"> v-model="textarea2">
</el-input> </el-input>
</div> </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"> <div slot="footer" class="dialog-footer">
<button <button
class="normalBtn" class="normalBtn"
...@@ -128,6 +140,9 @@ ...@@ -128,6 +140,9 @@
</div> </div>
</fieldset> </fieldset>
</div> </div>
<viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
<img v-for="src in images" :src="src" :key="src">
</viewer>
</div> </div>
</template> </template>
...@@ -141,7 +156,14 @@ export default { ...@@ -141,7 +156,14 @@ export default {
isUpdate:false, isUpdate:false,
textarea:'', textarea:'',
textarea2:'', textarea2:'',
progree:0 progree:0,
fileList: [],
attach: '',
imageOptions:{
navbar:false,
title:false
},
images: [],
}; };
}, },
mounted() { mounted() {
...@@ -151,6 +173,36 @@ export default { ...@@ -151,6 +173,36 @@ export default {
this.init(id); this.init(id);
}, },
methods: { 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) { init(id) {
this.apipost( this.apipost(
"user_post_GetWorkDetails", "user_post_GetWorkDetails",
...@@ -177,7 +229,7 @@ export default { ...@@ -177,7 +229,7 @@ export default {
pid:this.$route.query.id, pid:this.$route.query.id,
content:this.textarea2, content:this.textarea2,
progree:this.progree, progree:this.progree,
attach:"" attach: this.attach
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
:value="$t('pub.searchBtn')" :value="$t('pub.searchBtn')"
@click="getList();resetPageIndex()" @click="getList();resetPageIndex()"
/> />
<button class="normalBtn" @click="exportFile()">导出</button>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -261,6 +262,11 @@ export default { ...@@ -261,6 +262,11 @@ export default {
//this.getEmployee(); //this.getEmployee();
}, },
methods: { methods: {
exportFile(){
this.apipost('', {}, r=>{
})
},
resetPageIndex() { resetPageIndex() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.currentPage = 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