Browse Source

问卷

preview
jiangyy 4 years ago
parent
commit
f43ce91333
  1. 25
      epmet-oper-web/src/views/modules/workPc/guidance/DetailForm.vue

25
epmet-oper-web/src/views/modules/workPc/guidance/DetailForm.vue

@ -62,13 +62,17 @@
:key="item.moduleId" :key="item.moduleId"
:label="item.moduleName" :label="item.moduleName"
:name="item.moduleId"> :name="item.moduleId">
<quill-editor :ref="'text'+item.moduleId"
<quill-editor v-if="formType!='D'"
:ref="'text'+item.moduleId"
v-model="item.moduleContent" v-model="item.moduleContent"
:disabled="formType=='D'" :disabled="formType=='D'"
class="ql-container" class="ql-container"
:options="item.editorOption" :options="item.editorOption"
@change="onEditorChange" /> @change="onEditorChange" />
<!-- <text v-else>{{item.moduleContent}}</text> -->
<p v-else
v-html="item.moduleContent"></p>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -102,6 +106,7 @@
accept=".doc,.pdf,.xls,.docx,.xlsx" accept=".doc,.pdf,.xls,.docx,.xlsx"
:on-success="handleFileSuccess" :on-success="handleFileSuccess"
:on-remove="handleFileRemove" :on-remove="handleFileRemove"
:on-preview="handleFileDownload"
:limit="3" :limit="3"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:file-list="fileList"> :file-list="fileList">
@ -183,6 +188,7 @@ export default {
methods: { methods: {
async initData (guideId, formType) { async initData (guideId, formType) {
this.startLoading()
this.formType = formType this.formType = formType
this.guideId = guideId this.guideId = guideId
this.resetData() this.resetData()
@ -199,6 +205,7 @@ export default {
await this.loadFormData() await this.loadFormData()
} }
this.endLoading()
this.isLoaded = true this.isLoaded = true
}, },
@ -381,7 +388,6 @@ export default {
}) })
}, },
resetData () { resetData () {
this.moduleArray = [] this.moduleArray = []
// this.moduleArray.forEach(element => { // this.moduleArray.forEach(element => {
@ -456,6 +462,19 @@ export default {
} else this.$message.error(res.msg) } else this.$message.error(res.msg)
}, },
//
handleFileDownload (file) {
var a = document.createElement('a');
var event = new MouseEvent('click');
a.download = file.name;
console.log(a)
a.href = file.url;
a.dispatchEvent(event);
},
// //
startLoading () { startLoading () {
loading = Loading.service({ loading = Loading.service({

Loading…
Cancel
Save