|
@@ -8,18 +8,18 @@
|
|
|
<!-- 搜索参数需自行处理 -->
|
|
|
<div style="display: flex">
|
|
|
<el-form ref="searchForm" :model="searchForm" :inline="true">
|
|
|
- <el-form-item prop="name" label="">
|
|
|
+ <el-form-item prop="url" label="">
|
|
|
<el-input
|
|
|
- v-model.trim="searchForm.name"
|
|
|
+ v-model.trim="searchForm.url"
|
|
|
clearable
|
|
|
- placeholder="请输入名称"
|
|
|
+ placeholder="请输入网站地址"
|
|
|
style="margin: 0 10px;width: 200px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="status" label="">
|
|
|
- <el-select v-model="searchForm.status" placeholder="请选择类型" style="margin-right: 10px;width: 200px">
|
|
|
+ <el-form-item prop="type" label="">
|
|
|
+ <el-select v-model="searchForm.type" placeholder="请选择类型" style="margin-right: 10px;width: 200px">
|
|
|
<el-option
|
|
|
- v-for="(item, index) in rectificationState"
|
|
|
+ v-for="(item, index) in questionType"
|
|
|
:key="index"
|
|
|
:value="item.value"
|
|
|
:label="item.label"
|
|
@@ -61,19 +61,39 @@
|
|
|
:align="item.align"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <img v-if="item.img" :src="(scope.row[item.prop])" alt="" width="70" height="70">
|
|
|
+ <el-image
|
|
|
+ v-if="item.img && isEmpty(scope.row[item.prop])"
|
|
|
+ style="height: 70px; width: 70px"
|
|
|
+ alt=""
|
|
|
+ >
|
|
|
+ <div slot="error" class="image-slot" style="height:70px;width:70px;display: flex;align-items: center;justify-content: center;">
|
|
|
+ <i class="el-icon-user-solid" style="font-size: 50px;"></i>
|
|
|
+ </div>
|
|
|
+ </el-image>
|
|
|
+ <el-image
|
|
|
+ v-else-if="item.img"
|
|
|
+ :src="'/' + scope.row[item.prop]"
|
|
|
+ style="height: 70px; width: 70px"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
<span v-else>
|
|
|
{{
|
|
|
item.transform
|
|
|
? item.transform(scope.row[item.prop], scope.row)
|
|
|
- : scope.row[item.prop] || ''
|
|
|
+ : scope.row[item.prop] || ""
|
|
|
}}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column :width="210" label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button class="but" type="primary" @click="showEditForm(scope.row.id)">
|
|
|
+ <el-button :disabled="scope.row.status != 0" class="but" type="warning" @click="work(scope.row.id)">
|
|
|
+ 受理
|
|
|
+ </el-button>
|
|
|
+ <el-button :disabled="scope.row.status != 1" class="but" type="success" @click="finish(scope.row.id)">
|
|
|
+ 办结
|
|
|
+ </el-button>
|
|
|
+ <el-button :disabled="scope.row.status == 2" class="but" type="primary" @click="showEditForm(scope.row.id)">
|
|
|
编辑
|
|
|
</el-button>
|
|
|
<el-button class="but" type="danger" @click="del(scope.row.id)">
|
|
@@ -103,7 +123,7 @@
|
|
|
<script>
|
|
|
import RectificationEdit from './components/RectificationEdit'
|
|
|
import rectificationApi from '@/api/rectification'
|
|
|
-import { parseTime, getTypeName } from '@/utils/tool'
|
|
|
+import { parseTime, getTypeName, isEmpty } from '@/utils/tool'
|
|
|
import { rectificationState, questionType, equipmentType } from './constants/codeConsts'
|
|
|
|
|
|
export default {
|
|
@@ -113,10 +133,11 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ questionType: questionType,
|
|
|
searchForm: {
|
|
|
// 用于同步输入
|
|
|
- name: '',
|
|
|
- status: '' // 状态 【0:禁用 1:启用】
|
|
|
+ url: '',
|
|
|
+ type: '' // 类型 【0:功能无法使用 1:内容无法访问 2:信息不更新 3:内容不准确 4:咨询互动不回应 5:错别字 6:虚假伪造内容 7:其它】
|
|
|
},
|
|
|
rectificationState,
|
|
|
tableH: 'calc(100vh - 230px)',
|
|
@@ -131,6 +152,7 @@ export default {
|
|
|
{
|
|
|
label: '问题类型',
|
|
|
prop: 'questionType',
|
|
|
+ width: 120,
|
|
|
transform(value) {
|
|
|
return getTypeName(value, questionType)
|
|
|
},
|
|
@@ -142,22 +164,19 @@ export default {
|
|
|
width: 130,
|
|
|
checked: true // 动态列
|
|
|
},
|
|
|
- {
|
|
|
- label: '截图',
|
|
|
- prop: 'picture',
|
|
|
- checked: true // 动态列
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: '截图',
|
|
|
+ // prop: 'picture',
|
|
|
+ // img: true,
|
|
|
+ // transform(value) {
|
|
|
+ // return
|
|
|
+ // },
|
|
|
+ // checked: true // 动态列
|
|
|
+ // },
|
|
|
{
|
|
|
label: '描述',
|
|
|
prop: 'questionDescription',
|
|
|
- checked: true // 动态列
|
|
|
- },
|
|
|
- {
|
|
|
- label: '办理状态',
|
|
|
- prop: 'status',
|
|
|
- transform(value) {
|
|
|
- return getTypeName(value, rectificationState)
|
|
|
- },
|
|
|
+ width: 120,
|
|
|
checked: true // 动态列
|
|
|
},
|
|
|
{
|
|
@@ -165,37 +184,47 @@ export default {
|
|
|
prop: 'submitter',
|
|
|
checked: true // 动态列
|
|
|
},
|
|
|
- {
|
|
|
- label: '邮箱',
|
|
|
- prop: 'mail',
|
|
|
- checked: true // 动态列
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: '邮箱',
|
|
|
+ // prop: 'mail',
|
|
|
+ // checked: true // 动态列
|
|
|
+ // },
|
|
|
{
|
|
|
label: '手机号',
|
|
|
prop: 'phone',
|
|
|
+ width: 110,
|
|
|
checked: true // 动态列
|
|
|
},
|
|
|
{
|
|
|
label: '设备类型',
|
|
|
prop: 'equipment',
|
|
|
+ width: 100,
|
|
|
transform(value) {
|
|
|
return getTypeName(value, equipmentType)
|
|
|
},
|
|
|
checked: true // 动态列
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '办理状态',
|
|
|
+ prop: 'status',
|
|
|
+ transform(value) {
|
|
|
+ return getTypeName(value, rectificationState)
|
|
|
+ },
|
|
|
+ checked: true // 动态列
|
|
|
+ },
|
|
|
{
|
|
|
label: '创建时间',
|
|
|
prop: 'createTime',
|
|
|
transform(value) {
|
|
|
return parseTime(value)
|
|
|
},
|
|
|
- width: 160,
|
|
|
+ width: 110,
|
|
|
checked: true // 动态列
|
|
|
},
|
|
|
{
|
|
|
label: '办结时间',
|
|
|
prop: 'finishTime',
|
|
|
- width: 160,
|
|
|
+ width: 110,
|
|
|
checked: true // 动态列
|
|
|
},
|
|
|
|
|
@@ -219,12 +248,65 @@ export default {
|
|
|
this.submitSearch()
|
|
|
},
|
|
|
methods: {
|
|
|
+ isEmpty,
|
|
|
showAddForm() {
|
|
|
this.$refs.refRectificationEdit.showEditForm()
|
|
|
},
|
|
|
showEditForm(id) {
|
|
|
this.$refs.refRectificationEdit.showEditForm(id)
|
|
|
},
|
|
|
+ work(id) {
|
|
|
+ const message = '您确定要受理该问题吗'
|
|
|
+ this.$confirm(message, '提示', {
|
|
|
+ cancelButtonClass: 'btn-custom-cancel',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ rectificationApi.rectificationWork(id).then(res => {
|
|
|
+ if (res.data.result) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '已受理!'
|
|
|
+ })
|
|
|
+ this.getData()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '受理失败!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
+ finish(id) {
|
|
|
+ const message = '您确定要办结该问题吗'
|
|
|
+ this.$confirm(message, '提示', {
|
|
|
+ cancelButtonClass: 'btn-custom-cancel',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ rectificationApi.rectificationFinish(id).then(res => {
|
|
|
+ if (res.data.result) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '已办结!'
|
|
|
+ })
|
|
|
+ this.getData()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '办结失败!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
del(id) {
|
|
|
const message = '您确定要删除该数据吗'
|
|
|
this.$confirm(message, '提示', {
|