素材管理
This commit is contained in:
		| @@ -40,19 +40,11 @@ | |||||||
|         :current.sync="search.current" |         :current.sync="search.current" | ||||||
|         :size.sync="search.size" |         :size.sync="search.size" | ||||||
|         @getList="getList"> |         @getList="getList"> | ||||||
|         <el-table-column slot="user" width="140px" label="创建人" align="center"> |         <el-table-column slot="options" width="120px" fixed="right" label="操作" align="center"> | ||||||
|           <template slot-scope="{ row }"> |  | ||||||
|             <div class="userinfo"> |  | ||||||
|             </div> |  | ||||||
|           </template> |  | ||||||
|         </el-table-column> |  | ||||||
|         <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> |  | ||||||
|           <template slot-scope="{ row }"> |           <template slot-scope="{ row }"> | ||||||
|             <div class="table-options"> |             <div class="table-options"> | ||||||
|               <el-button type="text" @click="remindExamine(row.id)" v-if="['0'].includes(row.status)">催办</el-button> |               <el-button type="text" @click="id = row.id, toAdd(row)">编辑</el-button> | ||||||
|               <el-button type="text" @click="cancel(row.id)" v-if="['0'].includes(row.status)">撤回</el-button> |               <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||||
|               <el-button type="text" @click="toDetail(row.id)">详情</el-button> |  | ||||||
|               <el-button type="text" @click="toAdd(row.id)" v-if="['1', '3'].includes(row.status)">编辑</el-button> |  | ||||||
|             </div> |             </div> | ||||||
|           </template> |           </template> | ||||||
|         </el-table-column> |         </el-table-column> | ||||||
| @@ -60,7 +52,7 @@ | |||||||
|       <ai-dialog |       <ai-dialog | ||||||
|         :visible.sync="isShow" |         :visible.sync="isShow" | ||||||
|         width="920px" |         width="920px" | ||||||
|         :title="id ? '编辑' : '添加' + typeList[currIndex]" |         :title="(id ? '编辑' : '添加') + typeList[currIndex]" | ||||||
|         @close="onClose" |         @close="onClose" | ||||||
|         :close-on-click-modal="false" |         :close-on-click-modal="false" | ||||||
|         destroy-on-close |         destroy-on-close | ||||||
| @@ -95,7 +87,7 @@ | |||||||
|               </el-input> |               </el-input> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item v-if="currIndex === 1" label="上传图片" style="width: 100%;" prop="fileUrl" :rules="[{ required: true, message: '请上传', trigger: 'change' }]"> |             <el-form-item v-if="currIndex === 1" label="上传图片" style="width: 100%;" prop="fileUrl" :rules="[{ required: true, message: '请上传', trigger: 'change' }]"> | ||||||
|               <ai-uploader :instance="instance" v-model="form.fileUrl" :limit="1"></ai-uploader> |               <ai-uploader :instance="instance" url="/admin/file/add2" v-model="form.fileUrl" :limit="1"></ai-uploader> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item v-if="currIndex === 3" label="文件名称" style="width: 100%;" prop="title" :rules="[{ required: true, message: '请输入文件名称', trigger: 'blur' }]"> |             <el-form-item v-if="currIndex === 3" label="文件名称" style="width: 100%;" prop="title" :rules="[{ required: true, message: '请输入文件名称', trigger: 'blur' }]"> | ||||||
|               <el-input |               <el-input | ||||||
| @@ -119,7 +111,7 @@ | |||||||
|               </el-input> |               </el-input> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item v-if="currIndex === 4" label="上传视频" style="width: 100%;" prop="fileUrl" :rules="[{ required: true, message: '请上传', trigger: 'change' }]"> |             <el-form-item v-if="currIndex === 4" label="上传视频" style="width: 100%;" prop="fileUrl" :rules="[{ required: true, message: '请上传', trigger: 'change' }]"> | ||||||
|               <ai-uploader :instance="instance" fileType="file" v-model="form.fileUrl" :limit="1"></ai-uploader> |               <ai-uploader :instance="instance" url="/admin/file/add2" fileType="file" v-model="form.fileUrl" :limit="1"></ai-uploader> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|             <el-form-item v-if="currIndex === 4" label="视频封面图" prop="pictureUrl" style="width: 100%;" :rules="[{ required: true, message: '请上传视频封面图', trigger: 'change' }]"> |             <el-form-item v-if="currIndex === 4" label="视频封面图" prop="pictureUrl" style="width: 100%;" :rules="[{ required: true, message: '请上传视频封面图', trigger: 'change' }]"> | ||||||
|               <ai-uploader :instance="instance" v-model="form.pictureUrl" :limit="1"></ai-uploader> |               <ai-uploader :instance="instance" v-model="form.pictureUrl" :limit="1"></ai-uploader> | ||||||
| @@ -217,7 +209,6 @@ | |||||||
|           appId: '', |           appId: '', | ||||||
|           content: '', |           content: '', | ||||||
|           fileUrl: [], |           fileUrl: [], | ||||||
|           appid: '', |  | ||||||
|           pagePath: '', |           pagePath: '', | ||||||
|           pictureUrl: [], |           pictureUrl: [], | ||||||
|           title: '' |           title: '' | ||||||
| @@ -231,12 +222,50 @@ | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     computed: { |     computed: { | ||||||
|  |       mpTitle () { | ||||||
|  |         return { | ||||||
|  |           '0': '话术标题', | ||||||
|  |           '1': '图片名称', | ||||||
|  |           '2': '小程序标题', | ||||||
|  |           '3': '文件名称', | ||||||
|  |           '4': '视频名称', | ||||||
|  |           '5': '网页名称' | ||||||
|  |         }[this.currIndex] | ||||||
|  |       }, | ||||||
|  |  | ||||||
|       colConfigs () { |       colConfigs () { | ||||||
|  |         if (this.currIndex === 0) { | ||||||
|           return [ |           return [ | ||||||
|           { prop: 'taskTitle', label: '任务名称' }, |             { prop: 'title', label: this.mpTitle }, | ||||||
|           { prop: 'typeName', label: '群发类型', align: 'center' }, |             { prop: 'content', label: '话术内容', align: 'center' }, | ||||||
|           { slot: 'user', label: '创建人', openType: 'userName', align: 'center' }, |             { prop: 'createUserName', label: '添加人', align: 'center' }, | ||||||
|           { prop: 'choiceTime', label: '群发时间', align: 'center' } |             { prop: 'createTime', label: '添加时间', align: 'center' } | ||||||
|  |           ] | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (this.currIndex === 2) { | ||||||
|  |           return [ | ||||||
|  |             { prop: 'title', label: this.mpTitle }, | ||||||
|  |             { prop: 'appId', label: '小程序APPID', align: 'center' }, | ||||||
|  |             { prop: 'createUserName', label: '添加人', align: 'center' }, | ||||||
|  |             { prop: 'createTime', label: '添加时间', align: 'center' } | ||||||
|  |           ] | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (this.currIndex === 5) { | ||||||
|  |           return [ | ||||||
|  |             { prop: 'title', label: this.mpTitle }, | ||||||
|  |             { prop: 'pagePath', label: '外链网页', align: 'center' }, | ||||||
|  |             { prop: 'createUserName', label: '添加人', align: 'center' }, | ||||||
|  |             { prop: 'createTime', label: '添加时间', align: 'center' } | ||||||
|  |           ] | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         return [ | ||||||
|  |           { prop: 'title', label: this.mpTitle }, | ||||||
|  |           { prop: 'fileSizeStr', label: '文件大小', align: 'center' }, | ||||||
|  |           { prop: 'createUserName', label: '添加人', align: 'center' }, | ||||||
|  |           { prop: 'createTime', label: '添加时间', align: 'center' } | ||||||
|         ] |         ] | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| @@ -260,6 +289,21 @@ | |||||||
|         }) |         }) | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|  |       toAdd (e) { | ||||||
|  |         this.form = { | ||||||
|  |           ...this.form, | ||||||
|  |           ...e, | ||||||
|  |           fileUrl: e.fileUrl ? [{ | ||||||
|  |             url: e.fileUrl | ||||||
|  |           }] : '', | ||||||
|  |           pictureUrl: e.pictureUrl ? [{ | ||||||
|  |             url: e.pictureUrl | ||||||
|  |           }] : '' | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         this.isShow = true | ||||||
|  |       }, | ||||||
|  |  | ||||||
|       onClose () { |       onClose () { | ||||||
|         this.form.content = '' |         this.form.content = '' | ||||||
|         this.form.appId = '' |         this.form.appId = '' | ||||||
| @@ -267,6 +311,8 @@ | |||||||
|         this.form.pagePath = '' |         this.form.pagePath = '' | ||||||
|         this.form.pictureUrl = [] |         this.form.pictureUrl = [] | ||||||
|         this.form.title = '' |         this.form.title = '' | ||||||
|  |  | ||||||
|  |         this.id = '' | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|       confirm () { |       confirm () { | ||||||
| @@ -277,7 +323,7 @@ | |||||||
|               type: this.currIndex, |               type: this.currIndex, | ||||||
|               fileUrl: this.form.fileUrl.length ? this.form.fileUrl[0].url : '', |               fileUrl: this.form.fileUrl.length ? this.form.fileUrl[0].url : '', | ||||||
|               pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : '', |               pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : '', | ||||||
|               fileSizeStr: this.form.fileUrl.length ? this.form.fileUrl[0].fileSizeStr : '', |               fileSize: this.form.fileUrl.length ? this.form.fileUrl[0].fileSize : '', | ||||||
|             }).then(res => { |             }).then(res => { | ||||||
|               if (res.code == 0) { |               if (res.code == 0) { | ||||||
|                 this.$message.success('提交成功') |                 this.$message.success('提交成功') | ||||||
|   | |||||||
| @@ -359,6 +359,7 @@ export default { | |||||||
|                 item.url = res.data.url |                 item.url = res.data.url | ||||||
|                 item.url = res.data.url |                 item.url = res.data.url | ||||||
|                 item.fileSizeStr = res.data.fileSizeStr |                 item.fileSizeStr = res.data.fileSizeStr | ||||||
|  |                 item.fileSize = res.data.size | ||||||
|                 item.postfix = res.data.postfix |                 item.postfix = res.data.postfix | ||||||
|               } |               } | ||||||
|             }) |             }) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user