Browse Source

前端完善

dev
lichao 9 months ago
parent
commit
63176a58b5
  1. 59
      src/views/modules/shequzhili/materialcode/add.vue
  2. 24
      src/views/modules/shequzhili/materialcode/icmaterialcode.vue

59
src/views/modules/shequzhili/materialcode/add.vue

@ -4,26 +4,26 @@
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form" :inline="true" :model="formData" :rules="dataRule" :disabled="formType === 'detail'"
class="form">
<el-form-item label="物件名称" prop="title" label-width="150px">
<el-form-item label="物件名称" prop="name" label-width="150px">
<el-input v-model.trim="formData.name" size="small" clearable placeholder="请输入物件名称"
class="u-item-width-normal"></el-input>
</el-form-item>
<el-form-item label="物件介绍" prop="content" label-width="150px" style="display: block">
<el-form-item label="物件介绍" prop="introduce" label-width="150px" style="display: block">
<div class="item_width_1">
<Tinymce class="tinymce_view " v-if="formType != 'detail'" v-model.trim="formData.introduce" :height="250"
<el-input type = "textarea" v-if="formType != 'detail'" v-model.trim="formData.introduce" :row='4'
placeholder="在这里输入文字" />
</div>
</el-form-item>
<el-form-item label="备注" prop="content" label-width="150px" style="display: block">
<el-form-item label="备注" prop="remark" label-width="150px" style="display: block">
<div class="item_width_1">
<Tinymce class="tinymce_view " v-if="formType != 'detail'" v-model.trim="formData.remark" :height="250"
<el-input type = "textarea" v-if="formType != 'detail'" v-model.trim="formData.remark" :row='4'
placeholder="在这里输入文字" />
</div>
</el-form-item>
<el-form-item label="物件照片" label-width="140px" prop="coverPic">
<el-form-item label="物件照片" label-width="140px" prop="picture">
<template>
<upload-image :defaultFileList="fileList" :limit="1" @file-removed="handleFileRemoved"
@change="onChangeFileList"></upload-image>
@ -82,9 +82,11 @@ export default {
keyWords: '',
activityId: '',
formData: {
title: "",//
content: "",//
coverPic: "",//
name: "",//
introduce: "",//
remark: "",//
picture: "",//
picture: "",//
sendMsg: false,//
status: 0 //
},
@ -116,29 +118,16 @@ export default {
handleFileRemoved(file) {
//
console.log('File removed:', file);
this.formData.coverPic=""
this.formData.picture=""
//
},
// 广
advertisingTag(){
requestPost('/advertisingTag/list',{customerId:this.customerId}).then(res=>{
console.log(res,'res');
if(res.code==0){
this.adverTagList=res.data
}
})
},
// 广
advertisingTag(){
},
async initForm(typeid,row) {
this.startLoading();
if(row!=null){
this.formData = JSON.parse(JSON.stringify(row));
this.fileList.push({fileUrl:this.formData.coverPic})
console.log(this.formData.coverPic,'see');
this.fileList.push({fileUrl:this.formData.picture})
console.log(this.formData.picture,'see');
}
this.formType=typeid
@ -190,9 +179,9 @@ export default {
fileUrl: item.response.data.url
};
this.fileList = [ob];
this.formData.coverPic = ob.fileUrl;
this.formData.picture = ob.fileUrl;
}else {
this.formData.coverPic = '';
this.formData.picture = '';
}
},
@ -310,19 +299,13 @@ export default {
computed: {
dataRule() {
return {
title: [
{ required: true, message: '文章标题不能为空', trigger: 'blur' }
name: [
{ required: true, message: '物件名称不能为空', trigger: 'blur' }
],
content: [
{ required: true, message: '内容不能为空', trigger: 'blur' }
],
releaseTime: [
{ required: true, message: '请选择发布时间', trigger: 'blur' }
],
/* tagId: [
{ required: true, message: '请选择文章标签', trigger: 'blur' }
],*/
introduce: [
{ required: true, message: '物件介绍不能为空', trigger: 'blur' }
]
}
},

24
src/views/modules/shequzhili/materialcode/icmaterialcode.vue

@ -35,7 +35,13 @@
<el-table-column prop="name" label="名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="introduce" label="介绍" header-align="center" align="center"></el-table-column>
<el-table-column prop="picture" label="照片" header-align="center" align="center"></el-table-column>
<el-table-column prop="picture" label="图片" header-align="center" align="center">
<template slot-scope="scope">
<img :src="scope.row.picture"/>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" header-align="center" align="center"></el-table-column>
<!-- <el-table-column prop="code" label="二维码" header-align="center" align="center"></el-table-column>-->
@ -48,6 +54,8 @@
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="download(scope.row)">下载</el-button>
</template>
</el-table-column>
</el-table>
@ -115,16 +123,9 @@
// typeActivityadd, typeDetails
// },
async created () {
this.loadTable()
},
async mounted () {
// this.getOrgTrreeList()
//
// await this.getDemandOptions()
const { user } = this.$store.state
// this.agencyId = user.agencyId
//
// this.advertisingTag()
//
this.loadTable()
},
methods: {
@ -199,6 +200,11 @@
this.formShow = false
this.loadTable()
},
async download(row){
window.open(row.code)
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",

Loading…
Cancel
Save