Bläddra i källkod

阳光村务

wulanhaote
庞东旭 2 år sedan
förälder
incheckning
e3c785bd49
3 ändrade filer med 36 tillägg och 4 borttagningar
  1. +9
    -4
      src/views/sunVillage_info/list_contract_add.vue
  2. +11
    -0
      src/views/sunVillage_info/list_contract_detail.vue
  3. +16
    -0
      src/views/sunVillage_info/list_contract_edit.vue

+ 9
- 4
src/views/sunVillage_info/list_contract_add.vue Visa fil

@@ -105,7 +105,8 @@
<p style="margin-left: 5px;">公开内容</p>
</template>
</van-field>
<vue-html5-editor :content="content" :height="400" @change="updateData" style="margin-top: 10px;"></vue-html5-editor>

<vue-html5-editor :content="form.openContent" :height="400" @change="updateData" style="margin-top: 10px;"></vue-html5-editor>

<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" >
<template #label>
@@ -139,7 +140,8 @@
openAt:this.format(new Date(),'yyyy-MM-dd'),
openPic:'',
openFile:'',
otherName:''
otherName:'',
openContent:''
},
openPic:[],
otherGkTypeOptions:[],
@@ -170,8 +172,10 @@
},
methods: {
updateData(e = ''){
this.content = e;
console.info(e);
let c1 = e.replace(/<img width="100%"/g, '<img');
let c2 = c1.replace(/<img/g, '<img width="100%"');
this.form.openContent = c2;
console.log()
},
onSubmit(){
var that = this;
@@ -201,6 +205,7 @@
this.openFile2.splice(index,1);
},
afterRead(file) {
console.log(file)
// 此时可以自行将文件上传至服务器
file.map(res=>{
this.openPic.push(res.file);


+ 11
- 0
src/views/sunVillage_info/list_contract_detail.vue Visa fil

@@ -96,6 +96,16 @@
<!-- <img src="../../assets/images/sunVillage_info/addFile.png" width="120" />-->
<!-- </van-uploader>-->
</div>

<van-field readonly input-align="right" :border="false" >
<template #label>
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18">
<p style="margin-left: 5px;">公开内容</p>
</template>
</van-field>

<div id="openContent"></div>

<van-field readonly v-model="form.remark" placeholder="备注" input-align="right" :border="false" >
<template #label>
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18">
@@ -189,6 +199,7 @@
this.openPic[i] = {url:'/api'+rrr}
})
}
document.getElementById('openContent').innerHTML = res.data.openContent
that.form = res.data;
})
},


+ 16
- 0
src/views/sunVillage_info/list_contract_edit.vue Visa fil

@@ -99,6 +99,16 @@
<img src="../../assets/images/sunVillage_info/addFile.png" width="120" />
</van-uploader>
</div>

<van-field readonly input-align="right" :border="false" >
<template #label>
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18">
<p style="margin-left: 5px;">公开内容</p>
</template>
</van-field>

<vue-html5-editor :content="form.openContent" :height="400" @change="updateData" style="margin-top: 10px;"></vue-html5-editor>

<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" >
<template #label>
<img src="../../assets/images/sunVillage_info/add_tit_icon_05.png" width="18">
@@ -158,6 +168,12 @@
this.getDetail();
},
methods: {
updateData(e = ''){
let c1 = e.replace(/<img width="100%"/g, '<img');
let c2 = c1.replace(/<img/g, '<img width="100%"');
this.form.openContent = c2;
console.log()
},
getDetail(id){
otherPublicDetail(this.queryParams).then((res) => {
var that = this ;


Laddar…
Avbryt
Spara