<template>
|
<el-main>
|
<el-form :model="form" label-width="140px">
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="行政处罚决定书文号">
|
<el-input v-model="form.name"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="24">
|
<el-form-item label="公开情况">
|
<el-checkbox-group v-model="form.checkList">
|
<el-checkbox label="0"></el-checkbox>
|
<el-checkbox label="1"></el-checkbox>
|
<el-checkbox label="2"></el-checkbox>
|
</el-checkbox-group>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="24">
|
<el-form-item label="公开网站">
|
<el-input v-model="form.name"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-form-item label="网站公开情况截图">
|
<el-upload
|
action="/admin/sys-file/upload"
|
list-type="picture-card"
|
:headers="headers"
|
:file-list="fileList"
|
accept="image/png, image/jpeg"
|
:on-preview="handlePictureCardPreview"
|
:on-success="handleAvatarSuccess"
|
:on-remove="handleRemove">
|
<i class="el-icon-plus"></i>
|
</el-upload>
|
<el-dialog v-dialogDrag append-to-body :visible.sync="dialogVisible">
|
<img width="100%" :src="dialogImageUrl" alt="">
|
</el-dialog>
|
</el-form-item>
|
</el-row>
|
</el-form>
|
<div style="text-align: center">
|
<el-button v-if="isFinish!='2'" plain @click="dataFormSubmit('0')">保存</el-button>
|
<el-button v-if="isFinish!='2'" type="warning" plain @click="dataFormSubmit('1')">定稿</el-button>
|
<el-button type="primary" plain @click="viewVord(form)">预览</el-button>
|
<el-button type="success" plain @click="downloadWord(form)">下载</el-button>
|
</div>
|
<WordView ref="wordInfo" :isShowYulan="showView" @cancel="cancelWord"></WordView>
|
</el-main>
|
</template>
|
|
<script>
|
import WordView from "@/views/News/word-view";
|
export default {
|
name: "administrativeOpenSituation",
|
props: ['isShowYulan','id','isFinish','processId','title'],
|
components: {
|
WordView
|
},
|
data() {
|
return {
|
form: {
|
name:'',
|
time:'',
|
checkList:['1']
|
},
|
showView: false,
|
headers: {
|
'TENANT-ID': this.$store.getters.userInfo.tenantId,
|
Authorization: 'Bearer ' + this.$store.getters.access_token
|
},
|
dialogVisible:false,
|
fileList:[],
|
dialogImageUrl:''
|
}
|
},
|
methods: {
|
dataFormSubmit(type) {
|
|
},
|
viewVord(data) {
|
this.showView = true;
|
this.$nextTick(() => {
|
// this.$refs.wordInfo.init(data,"/wordes/criminalCasesLetter.docx")
|
})
|
},
|
downloadWord(data) {
|
|
},
|
cancelWord() {
|
this.showView = false;
|
},
|
|
/***图片上传****/
|
fileChange(fileList) { //设置phone
|
let temp_str = ''
|
if(fileList.length > 0) {
|
for (let i = 0; i < fileList.length; i++) {
|
if(fileList[i].response) {
|
if(fileList[i].response.code == 0) {
|
if(i == 0) {
|
temp_str += fileList[i].response.data.url
|
}else {
|
temp_str += ',' + fileList[i].response.data.url
|
}
|
}
|
}else {
|
if( i == 0) {
|
temp_str += fileList[i].url
|
}else {
|
temp_str += ',' + fileList[i].url
|
}
|
}
|
}
|
}
|
|
},
|
handleAvatarSuccess(response, file, fileList) { //文件上传成功时的钩子
|
console.log(response,'response')
|
console.log(file,'file')
|
console.log(fileList,'fileList')
|
this.fileChange(fileList)
|
|
},
|
handleRemove(file, fileList) { //文件列表移除文件时的钩子
|
this.fileChange(fileList)
|
},
|
handlePictureCardPreview(file) { //点击文件列表中已上传的文件时的钩子
|
this.dialogImageUrl = file.url;
|
this.dialogVisible = true;
|
},
|
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.avatar-uploader-box{
|
width: 100px;
|
height: 100px;
|
border: 1px dashed #d9d9d9;
|
border-radius: 6px;
|
cursor: pointer;
|
position: relative;
|
overflow: hidden;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
</style>
|