flat: 咨询信箱、等70%
This commit is contained in:
@@ -1,15 +1,48 @@
|
|||||||
import request from '@/router/axios';
|
import request from '@/router/axios';
|
||||||
|
|
||||||
export const getApplContentList =
|
export const getApplContentList =
|
||||||
(current, size, params) => {
|
(params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/jobslink-api/desk/applContent/getApplContentList',
|
url: '/api/jobslink-api/content/questionnaireSurveyInfo/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params
|
||||||
...params,
|
|
||||||
current,
|
|
||||||
size
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const addApplContentList =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/questionnaireSurveyInfo/add',
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const changePublish =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/questionnaireSurveyInfo/publish',
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const deleteQuestionnaireSurveyInfo =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/questionnaireSurveyInfo/delete',
|
||||||
|
method: 'delete',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getQueryQuestionnaireSurveyUserBySurveyId =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/questionnaireSurveyInfo/queryQuestionnaireSurveyUserBySurveyId',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
import request from '@/router/axios';
|
import request from '@/router/axios';
|
||||||
|
|
||||||
export const getList =
|
export const getList =
|
||||||
(current, size, params) => {
|
(params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/jobslink-api//content/consultMailboxInfo/list',
|
url: '/api/jobslink-api/content/consultMailboxInfo/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params
|
||||||
...params,
|
|
||||||
current,
|
|
||||||
size,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
import request from '@/router/axios';
|
import request from '@/router/axios';
|
||||||
|
|
||||||
export const getList =
|
export const getList =
|
||||||
(current, size, params) => {
|
(params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/jobslink-api/content/superviseComplaintInfo/list',
|
url: '/api/jobslink-api/content/superviseComplaintInfo/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params,
|
||||||
...params,
|
})
|
||||||
current,
|
}
|
||||||
size,
|
|
||||||
}
|
|
||||||
|
export const getInfo =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/superviseComplaintInfo/queryById',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
54
src/api/manage/survey.js
Normal file
54
src/api/manage/survey.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import request from '@/router/axios';
|
||||||
|
|
||||||
|
export const getList =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/employmentSurveyManage/list',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export const getInfo =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/employmentSurveyManage/queryById',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const addEmploymentSurveyManage =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/employmentSurveyManage/add',
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export const deleteEmploymentSurveyManage =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/employmentSurveyManage/delete',
|
||||||
|
method: 'delete',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getQueryEmploymentSurveyUserBySurveyId =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/employmentSurveyManage/queryEmploymentSurveyUserBySurveyId',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const publishEmploymentSurveyManage =
|
||||||
|
(params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/content/employmentSurveyManage/publish',
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
:data="data"
|
:data="data"
|
||||||
:page.sync="page"
|
:page.sync="page"
|
||||||
ref="crud"
|
ref="crud"
|
||||||
|
@row-save="rowSave"
|
||||||
|
@row-del="rowDel"
|
||||||
@search-change="searchChange"
|
@search-change="searchChange"
|
||||||
@current-change="currentChange"
|
@current-change="currentChange"
|
||||||
@size-change="sizeChange"
|
@size-change="sizeChange"
|
||||||
@@ -13,267 +15,294 @@
|
|||||||
@search-reset="searchReset"
|
@search-reset="searchReset"
|
||||||
@on-load="onLoad"
|
@on-load="onLoad"
|
||||||
>
|
>
|
||||||
<template slot="search" slot-scope="{row,size}">
|
<!-- <template slot="search" slot-scope="{row,size}">-->
|
||||||
<div style="width: 500px;">
|
<!-- <div style="width: 500px;">-->
|
||||||
<el-date-picker
|
<!-- <el-date-picker-->
|
||||||
v-model="row.applTime"
|
<!-- v-model="row.applTime"-->
|
||||||
type="daterange"
|
<!-- type="daterange"-->
|
||||||
range-separator="至"
|
<!-- range-separator="至"-->
|
||||||
start-placeholder="开始日期"
|
<!-- start-placeholder="开始日期"-->
|
||||||
end-placeholder="结束日期"
|
<!-- end-placeholder="结束日期"-->
|
||||||
format="yyyy 年 MM 月 dd 日"
|
<!-- format="yyyy 年 MM 月 dd 日"-->
|
||||||
value-format="yyyy-MM-dd"
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
@change="dateChange">
|
<!-- @change="dateChange">-->
|
||||||
</el-date-picker>
|
<!-- </el-date-picker>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<template slot="status" slot-scope="{ row }">
|
||||||
|
<el-switch
|
||||||
|
:value="row.status"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
@change="changeStatus(row)"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
<template slot="menu" slot-scope="{row}">
|
<template slot="menu" slot-scope="{row}">
|
||||||
<el-button size="small" type="text" @click="look(row)">查看</el-button>
|
<el-button size="small" type="text" @click="look(row)">
|
||||||
|
<i class="el-icon-view"></i>
|
||||||
|
查看回答
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
<!-- 新增、编辑 -->
|
<Detail :visible.sync="viewDrawer" :rowData="selectPushServiceData"></Detail>
|
||||||
<el-drawer :title="drawerTitle" :visible.sync="viewDrawer" size="60%">
|
|
||||||
<div>
|
|
||||||
<p>申请信息:</p>
|
|
||||||
<el-table
|
|
||||||
:data="lookData"
|
|
||||||
style="width: 100%;min-height: 120px !important;">
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
label="姓名">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="telephone"
|
|
||||||
label="手机号码"
|
|
||||||
width="180">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="type"
|
|
||||||
label="申请类型">
|
|
||||||
<template slot-scope="{ row }">
|
|
||||||
<span v-if="row.type==1">法律咨询</span>
|
|
||||||
<span v-if="row.type==2">技能提升</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="applTime"
|
|
||||||
label="申请时间">
|
|
||||||
<template slot-scope="{ row }">
|
|
||||||
<span>{{dateFormat(new Date(row.applTime), "yyyy/MM/dd")}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<p>申请内容:</p>
|
|
||||||
<Tinymce v-if="viewDrawer" v-model="formOption.content" ref="tinymce"></Tinymce>
|
|
||||||
</div>
|
|
||||||
</el-drawer>
|
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {dateFormat} from '@/util/date'
|
import {dateFormat} from '@/util/date'
|
||||||
import Tinymce from "@/components/Tinymce";
|
import Tinymce from "@/components/Tinymce";
|
||||||
import {getApplContentList} from '@/api/help/applicationsRecord/applicationsRecord'
|
import {
|
||||||
import {
|
getApplContentList,
|
||||||
getAllContentCategoryFirstList,
|
addApplContentList,
|
||||||
getAllContentCategorySecondList
|
changePublish,
|
||||||
} from '@/api/help/classify'
|
deleteQuestionnaireSurveyInfo
|
||||||
|
} from '@/api/help/applicationsRecord/applicationsRecord'
|
||||||
|
import Detail from './sub/detail.vue'
|
||||||
|
|
||||||
export default {
|
const initPages = {
|
||||||
name: "index",
|
pageSize: 10,
|
||||||
components: {
|
currentPage: 1,
|
||||||
Tinymce
|
total: 100,
|
||||||
},
|
}
|
||||||
mounted() {
|
const classStatus = {
|
||||||
this.firstList()
|
0: '未发布',
|
||||||
},
|
1: '发布',
|
||||||
data () {
|
2: '关闭'
|
||||||
|
}
|
||||||
|
const classIsRead = {
|
||||||
|
0: '未阅读',
|
||||||
|
1: '已阅读',
|
||||||
|
}
|
||||||
|
const classEnumStatus = Object.keys(classStatus).map((item) => ({
|
||||||
|
label: classStatus[item], value: Number(item)
|
||||||
|
}))
|
||||||
|
const classEnumIsRead = Object.keys(classIsRead).map((item) => ({
|
||||||
|
label: classIsRead[item], value: Number(item)
|
||||||
|
}))
|
||||||
|
export default {
|
||||||
|
name: "index",
|
||||||
|
components: {
|
||||||
|
Tinymce,
|
||||||
|
Detail
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
applTime: '',
|
||||||
|
selectPushServiceData: null,
|
||||||
|
loading: false,
|
||||||
|
viewDrawer: false,
|
||||||
|
query: {},
|
||||||
|
data: [],
|
||||||
|
page: Object.assign({}, initPages),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
option() {
|
||||||
return {
|
return {
|
||||||
applTime: '',
|
height: "auto",
|
||||||
loading:false,
|
tip: false,
|
||||||
viewDrawer:false,
|
searchShow: true,
|
||||||
drawerTitle: '新增内容',
|
searchMenuSpan: 6,
|
||||||
formOption: {},
|
border: true,
|
||||||
query: {},
|
index: true,
|
||||||
rules: {
|
indexLabel: "序号",
|
||||||
name: [
|
selection: false,
|
||||||
{ required: true, message: '请输入内容标题', trigger: 'blur' }
|
viewBtn: true,
|
||||||
],
|
viewBtnText: "查看问卷",
|
||||||
type: [
|
addBtn: true,
|
||||||
{ required: true, message: '请选择分类', trigger: 'blur' }
|
editBtn: false,
|
||||||
],
|
delBtn: true,
|
||||||
content: [
|
columnBtn: false,
|
||||||
{ required: true, message: '请输入内容', trigger: 'blur' }
|
menuWidth: 300,
|
||||||
],
|
labelWidth: 151,
|
||||||
},
|
dialogClickModal: false,
|
||||||
option: {
|
dialogType: "drawer",
|
||||||
height: "auto",
|
dialogFullscreen: true,
|
||||||
tip: false,
|
align: 'center',
|
||||||
searchShow: true,
|
column: [
|
||||||
searchMenuSpan: 6,
|
{
|
||||||
border: true,
|
label: "机构名称",
|
||||||
index: true,
|
prop: "companyName",
|
||||||
indexLabel: "序号",
|
addDisplay: false,
|
||||||
selection: false,
|
span: 24,
|
||||||
viewBtn: false,
|
},
|
||||||
addBtn: false,
|
{
|
||||||
editBtn:false,
|
label: "问卷题目",
|
||||||
delBtn: false,
|
prop: "surveyTitle",
|
||||||
columnBtn: false,
|
span: 24,
|
||||||
menuWidth: 300,
|
search: true,
|
||||||
labelWidth: 151,
|
rules: [
|
||||||
dialogClickModal: false,
|
{
|
||||||
dialogType: "drawer",
|
required: true,
|
||||||
dialogFullscreen: true,
|
message: "输入问卷题目",
|
||||||
column: [
|
trigger: "change",
|
||||||
{
|
|
||||||
label: "姓名",
|
|
||||||
prop: "name",
|
|
||||||
display: false,
|
|
||||||
search: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "手机号码",
|
|
||||||
prop: "telephone",
|
|
||||||
display: false,
|
|
||||||
search: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "申请类型",
|
|
||||||
prop: "type",
|
|
||||||
display: false,
|
|
||||||
search: true,
|
|
||||||
type: "tree",
|
|
||||||
dicData: [
|
|
||||||
{
|
|
||||||
name: '法律咨询',
|
|
||||||
type: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '技能提升',
|
|
||||||
type: 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
props: {
|
|
||||||
label: "name",
|
|
||||||
value: "type",
|
|
||||||
},
|
},
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
label: "申请时间",
|
{
|
||||||
prop: "applTime",
|
label: "问卷内容",
|
||||||
display: false,
|
prop: "surveyContent",
|
||||||
type:'datetime',
|
span: 24,
|
||||||
searchSpan:8,
|
search: false,
|
||||||
searchRange:true,
|
rules: [
|
||||||
format: "yyyy/MM/dd",
|
{
|
||||||
}
|
required: true,
|
||||||
]
|
message: "输入问卷内容",
|
||||||
},
|
trigger: "change",
|
||||||
data: [],
|
},
|
||||||
lookData: [],
|
]
|
||||||
page: {
|
},
|
||||||
pageSize: 10,
|
{
|
||||||
currentPage: 1,
|
label: "创建人",
|
||||||
total: 100,
|
prop: "createUser",
|
||||||
},
|
addDisplay: false,
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
methods: {
|
label: "创建时间",
|
||||||
dateFormat,
|
prop: "createTime",
|
||||||
dateChange(val){
|
type: 'datetime',
|
||||||
if(val){
|
addDisplay: false,
|
||||||
this.query.applTimeStart = val[0] + "00:00:00";
|
searchSpan: 8,
|
||||||
this.query.applTimeEnd = val[1] + "23:59:59";
|
searchRange: true,
|
||||||
}else{
|
search: false,
|
||||||
this.query.applTimeStart = '';
|
format: "yyyy/MM/dd",
|
||||||
this.query.applTimeEnd = '';
|
},
|
||||||
}
|
{
|
||||||
},
|
label: '发布状态',
|
||||||
firstList(){
|
prop: 'status',
|
||||||
getAllContentCategoryFirstList().then(res => {
|
type: 'select',
|
||||||
this.first = res.data.data
|
addDisplay: false,
|
||||||
})
|
dicData: [
|
||||||
},
|
{label: '未发布', value: 0},
|
||||||
secondList (id) {
|
{label: '已发布', value: 1},
|
||||||
getAllContentCategorySecondList (id).then(res => {
|
],
|
||||||
this.formOption.secondId = ''
|
slot: true,
|
||||||
this.second = res.data.data
|
width: 100
|
||||||
})
|
},
|
||||||
},
|
]
|
||||||
add () {
|
|
||||||
this.formOption = {}
|
|
||||||
this.drawerTitle = '新增内容'
|
|
||||||
this.viewDrawer = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.ruleForm.clearValidate();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
look(row){
|
|
||||||
this.drawerTitle = '查看'
|
|
||||||
this.lookData = JSON.parse(JSON.stringify([row]))
|
|
||||||
this.formOption = JSON.parse(JSON.stringify(row))
|
|
||||||
this.viewDrawer = true
|
|
||||||
},
|
|
||||||
submitForm(formName) {
|
|
||||||
this.$refs[formName].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
console.log(this.formOption);
|
|
||||||
this.viewDrawer = false
|
|
||||||
} else {
|
|
||||||
console.log('error submit!!');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
resetForm(formName) {
|
|
||||||
this.$refs[formName].resetFields();
|
|
||||||
this.viewDrawer = false
|
|
||||||
},
|
|
||||||
/* 表格方法 */
|
|
||||||
onLoad(page, params = {}) {
|
|
||||||
this.loading = true;
|
|
||||||
getApplContentList(
|
|
||||||
page.currentPage,
|
|
||||||
page.pageSize,
|
|
||||||
Object.assign(this.query, params)
|
|
||||||
).then((res) => {
|
|
||||||
this.data = res.data.data.records;
|
|
||||||
this.page.total = res.data.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
searchReset() {
|
|
||||||
this.query = {};
|
|
||||||
this.onLoad(this.page);
|
|
||||||
},
|
|
||||||
searchChange(params,done) {
|
|
||||||
console.log(params);
|
|
||||||
if (params.applTime) {
|
|
||||||
var val = JSON.parse(JSON.stringify(params.applTime))
|
|
||||||
params.applTimeStart = val[0] + " 00:00:00";
|
|
||||||
params.applTimeEnd = val[1] + " 23:59:59";
|
|
||||||
delete params.applTime
|
|
||||||
}
|
|
||||||
this.query = params;
|
|
||||||
console.log(this.query);
|
|
||||||
this.page.currentPage = 1;
|
|
||||||
this.onLoad(this.page, params);
|
|
||||||
done();
|
|
||||||
},
|
|
||||||
currentChange(val) {
|
|
||||||
this.page.currentPage = val
|
|
||||||
},
|
|
||||||
sizeChange(val) {
|
|
||||||
this.page.currentPage = 1
|
|
||||||
this.page.pageSize = val
|
|
||||||
},
|
|
||||||
refreshChange () {
|
|
||||||
this.page.currentPage = 1;
|
|
||||||
this.onLoad(this.page)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
dateFormat,
|
||||||
|
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.onLoad();
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
console.log(params);
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad();
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
currentChange(val) {
|
||||||
|
this.page.currentPage = val
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
sizeChange(val) {
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.page.pageSize = val
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
look(row) {
|
||||||
|
this.selectPushServiceData = row
|
||||||
|
this.viewDrawer = true
|
||||||
|
},
|
||||||
|
async changeStatus(row) {
|
||||||
|
const status = row.status ? 0 : 1
|
||||||
|
let params = {id: row.id, status}
|
||||||
|
console.log(params)
|
||||||
|
let resData = await changePublish(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
this.$message.success('状态修改成功');
|
||||||
|
this.onLoad()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rowDel(row) {
|
||||||
|
const h = this.$createElement;
|
||||||
|
this.$confirm(
|
||||||
|
h("div", null, [
|
||||||
|
h("p", {style: "font-size: 16px"}, "您确定要删除此问卷吗? "),
|
||||||
|
h("p", {style: "color: red"}, "一旦删除则无法找回"),
|
||||||
|
]),
|
||||||
|
{
|
||||||
|
type: "warning",
|
||||||
|
showClose: false,
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
beforeClose: async (action, instance, done) => {
|
||||||
|
if (action === "confirm") {
|
||||||
|
let resData = await deleteQuestionnaireSurveyInfo({id: row.id})
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
this.onLoad()
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
done()
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
rowSave(row, done, loading) {
|
||||||
|
const params = {
|
||||||
|
surveyTitle: row.surveyTitle,
|
||||||
|
surveyContent: row.surveyContent,
|
||||||
|
};
|
||||||
|
addApplContentList(params).then(
|
||||||
|
() => {
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.onLoad();
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
window.console.log(error);
|
||||||
|
loading();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/* 表格方法 */
|
||||||
|
onLoad() {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
this.loading = true;
|
||||||
|
let params = {
|
||||||
|
current: this.page.currentPage,
|
||||||
|
size: this.page.pageSize,
|
||||||
|
...this.query,
|
||||||
|
}
|
||||||
|
let resData = await getApplContentList(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const {current, records, total, size} = resData.data.data
|
||||||
|
this.data = records;
|
||||||
|
this.page.total = total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
167
src/views/manage/applicationsRecord/sub/detail.vue
Normal file
167
src/views/manage/applicationsRecord/sub/detail.vue
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
title="问卷回答列表"
|
||||||
|
:visible.sync="viewDrawer"
|
||||||
|
append-to-body
|
||||||
|
size="100%"
|
||||||
|
>
|
||||||
|
<avue-crud
|
||||||
|
:option="option"
|
||||||
|
:table-loading="loading"
|
||||||
|
:data="data"
|
||||||
|
:page.sync="page"
|
||||||
|
ref="crud"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@refresh-change="refreshChange"
|
||||||
|
@search-reset="searchReset"
|
||||||
|
>
|
||||||
|
|
||||||
|
</avue-crud>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getQueryQuestionnaireSurveyUserBySurveyId,
|
||||||
|
} from '@/api/help/applicationsRecord/applicationsRecord'
|
||||||
|
|
||||||
|
const initPages = {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 100,
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
visible: Boolean,
|
||||||
|
rowData: {default: null, type: Function},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
viewDrawer: {
|
||||||
|
get() {
|
||||||
|
return this.visible;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit("update:visible", val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
option() {
|
||||||
|
return {
|
||||||
|
size: 'medium',
|
||||||
|
dateBtn: false,
|
||||||
|
addBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
height: "auto",
|
||||||
|
reserveSelection: false,
|
||||||
|
border: true,
|
||||||
|
columnBtn: false,
|
||||||
|
refreshBtn: false,
|
||||||
|
menu: false,
|
||||||
|
tip: false,
|
||||||
|
selection: true,
|
||||||
|
searchMenuSpan: 6,
|
||||||
|
align: 'center',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: '应答人',
|
||||||
|
prop: 'replyName',
|
||||||
|
search: true,
|
||||||
|
}, {
|
||||||
|
label: '回复内容',
|
||||||
|
prop: 'replyContent',
|
||||||
|
}, {
|
||||||
|
label: '用户电话',
|
||||||
|
prop: 'replyPhone',
|
||||||
|
search: true,
|
||||||
|
}, {
|
||||||
|
label: '手机号',
|
||||||
|
prop: 'surveyContent',
|
||||||
|
search: true,
|
||||||
|
}, {
|
||||||
|
label: '创建人',
|
||||||
|
prop: 'createUser',
|
||||||
|
}, {
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'createTime',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
viewDrawer(val) {
|
||||||
|
val ? this.onPageLoad() : null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
data: [],
|
||||||
|
page: Object.assign({}, initPages),
|
||||||
|
query: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onPageLoad() {
|
||||||
|
if (!this.rowData) return
|
||||||
|
console.log('row2', this.rowData)
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad();
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
currentChange(val) {
|
||||||
|
this.page.currentPage = val
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
sizeChange(val) {
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.page.pageSize = val
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.onLoad();
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
if (!this.rowData) return
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let params = {
|
||||||
|
surveyId: this.rowData.id,
|
||||||
|
current: this.page.currentPage,
|
||||||
|
size: this.page.pageSize,
|
||||||
|
...this.query,
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let resData = await getQueryQuestionnaireSurveyUserBySurveyId(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const {current, records, total, size} = resData.data.data
|
||||||
|
this.data = records;
|
||||||
|
this.page.total = total;
|
||||||
|
this.loading = false;
|
||||||
|
resolve()
|
||||||
|
} else {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -13,26 +13,26 @@
|
|||||||
@search-reset="searchReset"
|
@search-reset="searchReset"
|
||||||
@on-load="onLoad"
|
@on-load="onLoad"
|
||||||
>
|
>
|
||||||
<template slot="menu" slot-scope="{row}">
|
<!-- <template slot="menu" slot-scope="{row}">-->
|
||||||
<el-button size="small" type="text" @click="look(row)">查看</el-button>
|
<!-- <el-button size="small" type="text" @click="seeDetail(row)">查看</el-button>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
<!-- 新增、编辑 -->
|
<!-- 新增、编辑 -->
|
||||||
<el-drawer :title="drawerTitle" :visible.sync="viewDrawer" size="60%">
|
<!-- <el-drawer :title="drawerTitle" :visible.sync="viewDrawer" size="60%">-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<el-row :gutter="20">
|
<!-- <el-row :gutter="20">-->
|
||||||
<el-col :span="12"><span>咨询部门:</span>{{ lookData.consultDeptName }}</el-col>
|
<!-- <el-col :span="12"><span>咨询部门:</span>{{ lookData.consultDeptName }}</el-col>-->
|
||||||
<el-col :span="12"><span>咨询题目:</span>{{ lookData.consultTopic }}</el-col>
|
<!-- <el-col :span="12"><span>咨询题目:</span>{{ lookData.consultTopic }}</el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
<el-row :gutter="20">
|
<!-- <el-row :gutter="20">-->
|
||||||
<el-col :span="12"><span>咨询内容:</span>{{ lookData.consultContent }}</el-col>
|
<!-- <el-col :span="12"><span>咨询内容:</span>{{ lookData.consultContent }}</el-col>-->
|
||||||
<el-col :span="12"><span>联系电话:</span>{{ lookData.consultPhone }}</el-col>
|
<!-- <el-col :span="12"><span>联系电话:</span>{{ lookData.consultPhone }}</el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
<el-row :gutter="20">
|
<!-- <el-row :gutter="20">-->
|
||||||
<el-col :span="12"><span>咨询日期:</span>{{ lookData.consultTime }}</el-col>
|
<!-- <el-col :span="12"><span>咨询日期:</span>{{ lookData.consultTime }}</el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-drawer>
|
<!-- </el-drawer>-->
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -40,43 +40,97 @@
|
|||||||
import {dateFormat} from '@/util/date'
|
import {dateFormat} from '@/util/date'
|
||||||
import Tinymce from "@/components/Tinymce";
|
import Tinymce from "@/components/Tinymce";
|
||||||
import {getList} from '@/api/manage/mailbox'
|
import {getList} from '@/api/manage/mailbox'
|
||||||
|
|
||||||
|
const classStatus = {
|
||||||
|
0: '未处理',
|
||||||
|
1: '已处理',
|
||||||
|
}
|
||||||
|
const initPages = {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 100,
|
||||||
|
}
|
||||||
|
const classEnumStatus = Object.keys(classStatus).map((item) => ({
|
||||||
|
label: classStatus[item], value: Number(item)
|
||||||
|
}))
|
||||||
const columnList = [
|
const columnList = [
|
||||||
{
|
// {
|
||||||
label: "咨询部门",
|
// label: "咨询部门",
|
||||||
prop: "consultDeptName",
|
// prop: "consultDeptName",
|
||||||
search: false,
|
// search: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: "咨询题目",
|
label: "咨询题目",
|
||||||
prop: "consultTopic",
|
prop: "consultTopic",
|
||||||
search: false,
|
search: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "咨询人",
|
||||||
|
prop: "consultName",
|
||||||
|
search: true,
|
||||||
|
}, {
|
||||||
|
label: "创建人",
|
||||||
|
prop: "createUser",
|
||||||
|
hide: true,
|
||||||
|
}, {
|
||||||
|
label: "创建部门",
|
||||||
|
prop: "createDept",
|
||||||
|
hide: true,
|
||||||
|
}, {
|
||||||
|
label: "修改人",
|
||||||
|
prop: "updateUser",
|
||||||
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "咨询内容",
|
label: "咨询内容",
|
||||||
prop: "consultContent",
|
prop: "consultContent",
|
||||||
search: false,
|
search: false,
|
||||||
}, {
|
},
|
||||||
label: "联系电话",
|
{
|
||||||
prop: "consultPhone",
|
label: "意见内容",
|
||||||
|
prop: "opinionContent",
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "联系电话",
|
||||||
|
prop: "reply_content",
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "咨询日期",
|
label: "咨询日期",
|
||||||
prop: "consultTime",
|
prop: "consultTime",
|
||||||
type:'datetime',
|
type: 'datetime',
|
||||||
searchSpan:8,
|
searchSpan: 8,
|
||||||
searchRange:true,
|
searchRange: true,
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
label: "处置情况",
|
||||||
|
prop: "disposalSituation",
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否阅读",
|
||||||
|
prop: "isRead",
|
||||||
|
search: false,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否处理",
|
||||||
|
prop: "status",
|
||||||
|
type: "select",
|
||||||
|
dicData: classEnumStatus,
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入内容标题', trigger: 'blur' }
|
{required: true, message: '请输入内容标题', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: '请选择分类', trigger: 'blur' }
|
{required: true, message: '请选择分类', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
content: [
|
content: [
|
||||||
{ required: true, message: '请输入内容', trigger: 'blur' }
|
{required: true, message: '请输入内容', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
@@ -86,16 +140,23 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
applTime: '',
|
applTime: '',
|
||||||
loading:false,
|
loading: false,
|
||||||
viewDrawer:false,
|
viewDrawer: false,
|
||||||
drawerTitle: '新增内容',
|
drawerTitle: '新增内容',
|
||||||
formOption: {},
|
formOption: {},
|
||||||
query: {},
|
query: {},
|
||||||
rules: Object.assign({}, rules),
|
rules: Object.assign({}, rules),
|
||||||
option: {
|
data: [],
|
||||||
|
lookData: {},
|
||||||
|
page: Object.assign({}, initPages),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
option() {
|
||||||
|
return {
|
||||||
height: "auto",
|
height: "auto",
|
||||||
tip: false,
|
tip: false,
|
||||||
searchShow: true,
|
searchShow: true,
|
||||||
@@ -104,25 +165,18 @@ export default {
|
|||||||
index: true,
|
index: true,
|
||||||
indexLabel: "序号",
|
indexLabel: "序号",
|
||||||
selection: false,
|
selection: false,
|
||||||
viewBtn: false,
|
viewBtn: true,
|
||||||
addBtn: false,
|
addBtn: false,
|
||||||
editBtn:false,
|
editBtn: false,
|
||||||
delBtn: false,
|
delBtn: false,
|
||||||
columnBtn: false,
|
columnBtn: false,
|
||||||
menuWidth: 300,
|
menuWidth: 150,
|
||||||
labelWidth: 151,
|
// labelWidth: 151,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
dialogType: "drawer",
|
dialogType: "drawer",
|
||||||
dialogFullscreen: true,
|
dialogFullscreen: true,
|
||||||
column: columnList,
|
column: columnList,
|
||||||
},
|
}
|
||||||
data: [],
|
|
||||||
lookData: {},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
currentPage: 1,
|
|
||||||
total: 100,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -137,24 +191,11 @@ export default {
|
|||||||
this.$refs[formName].resetFields();
|
this.$refs[formName].resetFields();
|
||||||
this.viewDrawer = false
|
this.viewDrawer = false
|
||||||
},
|
},
|
||||||
/* 表格方法 */
|
|
||||||
onLoad(page, params = {}) {
|
|
||||||
this.loading = true;
|
|
||||||
getList(
|
|
||||||
page.currentPage,
|
|
||||||
page.pageSize,
|
|
||||||
Object.assign(this.query, params)
|
|
||||||
).then((res) => {
|
|
||||||
this.data = res.data.data.records;
|
|
||||||
this.page.total = res.data.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
this.onLoad(this.page);
|
this.onLoad();
|
||||||
},
|
},
|
||||||
searchChange(params,done) {
|
searchChange(params, done) {
|
||||||
console.log(params);
|
console.log(params);
|
||||||
if (params.applTime) {
|
if (params.applTime) {
|
||||||
var val = JSON.parse(JSON.stringify(params.applTime))
|
var val = JSON.parse(JSON.stringify(params.applTime))
|
||||||
@@ -165,7 +206,7 @@ export default {
|
|||||||
this.query = params;
|
this.query = params;
|
||||||
console.log(this.query);
|
console.log(this.query);
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page, params);
|
this.onLoad();
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
currentChange(val) {
|
currentChange(val) {
|
||||||
@@ -175,9 +216,30 @@ export default {
|
|||||||
this.page.currentPage = 1
|
this.page.currentPage = 1
|
||||||
this.page.pageSize = val
|
this.page.pageSize = val
|
||||||
},
|
},
|
||||||
refreshChange () {
|
refreshChange() {
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page)
|
this.onLoad()
|
||||||
|
},
|
||||||
|
/* 表格方法 */
|
||||||
|
onLoad() {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
this.loading = true;
|
||||||
|
let params = {
|
||||||
|
current: this.page.currentPage,
|
||||||
|
size: this.page.pageSize,
|
||||||
|
...this.query,
|
||||||
|
}
|
||||||
|
let resData = await getList(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const {current, records, total, size} = resData.data.data
|
||||||
|
this.data = records;
|
||||||
|
this.page.total = total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
seeDetail() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,90 +13,107 @@
|
|||||||
@search-reset="searchReset"
|
@search-reset="searchReset"
|
||||||
@on-load="onLoad"
|
@on-load="onLoad"
|
||||||
>
|
>
|
||||||
<template slot="menu" slot-scope="{row}">
|
|
||||||
<el-button size="small" type="text" @click="look(row)">查看</el-button>
|
|
||||||
</template>
|
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
<!-- 新增、编辑 -->
|
|
||||||
<el-drawer :title="drawerTitle" :visible.sync="viewDrawer" size="60%">
|
|
||||||
<div>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12"><span>投诉标题:</span>{{ lookData.complaintTitle }}</el-col>
|
|
||||||
<el-col :span="12"><span>投诉对象:</span>{{ lookData.complaintObject }}</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12"><span>投诉类型:</span>{{ classEnum[lookData.complaintType] }}</el-col>
|
|
||||||
<el-col :span="12"><span>联系方式:</span>{{ lookData.complaintPhone }}</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12"><span>创建时间:</span>{{ lookData.complaintTime }}</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-drawer>
|
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {dateFormat} from '@/util/date'
|
import {dateFormat} from '@/util/date'
|
||||||
import Tinymce from "@/components/Tinymce";
|
import Tinymce from "@/components/Tinymce";
|
||||||
import {getList} from '@/api/manage/superviseComplaintInfo'
|
import {getList, getInfo} from '@/api/manage/superviseComplaintInfo'
|
||||||
|
|
||||||
|
const initPages = {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 100,
|
||||||
|
}
|
||||||
const classEnum = {
|
const classEnum = {
|
||||||
1: '分类1',
|
"1": '一般投诉',
|
||||||
2: '分类2',
|
"2": '较难投诉',
|
||||||
3: '分类3',
|
"3": '困难投诉',
|
||||||
4: '分类4',
|
"4": '特殊投诉',
|
||||||
|
}
|
||||||
|
const classIsDeleted = {
|
||||||
|
0: '否',
|
||||||
|
1: '是',
|
||||||
|
}
|
||||||
|
const classStatus = {
|
||||||
|
0: '未发布',
|
||||||
|
1: '发布',
|
||||||
|
2: '关闭'
|
||||||
}
|
}
|
||||||
const classEnumList = Object.keys(classEnum).map((item) => ({
|
const classEnumList = Object.keys(classEnum).map((item) => ({
|
||||||
name: classEnum[item], type: Number(item)
|
label: classEnum[item], value: item
|
||||||
|
}))
|
||||||
|
const classEnumDeleted = Object.keys(classIsDeleted).map((item) => ({
|
||||||
|
label: classIsDeleted[item], value: Number(item)
|
||||||
|
}))
|
||||||
|
const classEnumStatus = Object.keys(classStatus).map((item) => ({
|
||||||
|
label: classStatus[item], value: Number(item)
|
||||||
}))
|
}))
|
||||||
const columnList = [
|
const columnList = [
|
||||||
{
|
{
|
||||||
label: "投诉标题",
|
label: "投诉标题",
|
||||||
prop: "complaintTitle",
|
prop: "complaintTitle",
|
||||||
search: false
|
search: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "投诉对象",
|
label: "投诉对象",
|
||||||
prop: "complaintObject",
|
prop: "complaintObject",
|
||||||
search: false
|
search: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "投诉名称",
|
|
||||||
prop: "complaintName",
|
|
||||||
search: false
|
|
||||||
}, {
|
|
||||||
label: "联系方式",
|
label: "联系方式",
|
||||||
prop: "complaintPhone",
|
prop: "complaintPhone",
|
||||||
search: false
|
search: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "投诉类型",
|
label: "投诉类型",
|
||||||
prop: "complaintType",
|
prop: "complaintType",
|
||||||
search: false,
|
type: "select",
|
||||||
type: "tree",
|
dataType: "number",
|
||||||
dicData: classEnumList,
|
dicData: classEnumList,
|
||||||
props: {
|
display: false,
|
||||||
label: "name",
|
search: true
|
||||||
value: "type",
|
},
|
||||||
},
|
{
|
||||||
|
label: "是否处理",
|
||||||
|
prop: "status",
|
||||||
|
type: "select",
|
||||||
|
dicData: classEnumStatus,
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否删除",
|
||||||
|
prop: "isDeleted",
|
||||||
|
type: "select",
|
||||||
|
dicData: classEnumDeleted,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否已读",
|
||||||
|
prop: "isRead",
|
||||||
|
type: "select",
|
||||||
|
dicData: classEnumDeleted,
|
||||||
|
search: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "创建时间",
|
label: "创建时间",
|
||||||
prop: "complaintTime",
|
prop: "complaintTime",
|
||||||
type:'datetime',
|
type: 'datetime',
|
||||||
searchSpan:8,
|
searchSpan: 8,
|
||||||
searchRange:true,
|
searchRange: true,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入内容标题', trigger: 'blur' }
|
{required: true, message: '请输入内容标题', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: '请选择分类', trigger: 'blur' }
|
{required: true, message: '请选择分类', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
content: [
|
content: [
|
||||||
{ required: true, message: '请输入内容', trigger: 'blur' }
|
{required: true, message: '请输入内容', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
@@ -104,18 +121,27 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
Tinymce
|
Tinymce
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
|
// this.seeDetail({id: '1783485236359442433'})
|
||||||
},
|
},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
applTime: '',
|
applTime: '',
|
||||||
loading:false,
|
loading: false,
|
||||||
viewDrawer:false,
|
viewDrawer: false,
|
||||||
drawerTitle: '新增内容',
|
drawerTitle: '新增内容',
|
||||||
formOption: {},
|
formOption: {},
|
||||||
query: {},
|
query: {},
|
||||||
rules: Object.assign({}, rules),
|
rules: Object.assign({}, rules),
|
||||||
option: {
|
data: [],
|
||||||
|
lookData: {},
|
||||||
|
classEnum,
|
||||||
|
page: Object.assign({}, initPages),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
option() {
|
||||||
|
return {
|
||||||
height: "auto",
|
height: "auto",
|
||||||
tip: false,
|
tip: false,
|
||||||
searchShow: true,
|
searchShow: true,
|
||||||
@@ -124,58 +150,31 @@ export default {
|
|||||||
index: true,
|
index: true,
|
||||||
indexLabel: "序号",
|
indexLabel: "序号",
|
||||||
selection: false,
|
selection: false,
|
||||||
viewBtn: false,
|
viewBtn: true,
|
||||||
addBtn: false,
|
addBtn: false,
|
||||||
editBtn:false,
|
editBtn: false,
|
||||||
delBtn: false,
|
delBtn: false,
|
||||||
columnBtn: false,
|
columnBtn: false,
|
||||||
menuWidth: 300,
|
menuWidth: 140,
|
||||||
labelWidth: 151,
|
labelWidth: 151,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
dialogType: "drawer",
|
dialogType: "drawer",
|
||||||
dialogFullscreen: true,
|
dialogFullscreen: true,
|
||||||
column: columnList,
|
column: columnList,
|
||||||
},
|
}
|
||||||
data: [],
|
|
||||||
lookData: {},
|
|
||||||
classEnum,
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
currentPage: 1,
|
|
||||||
total: 100,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dateFormat,
|
dateFormat,
|
||||||
look(row) {
|
|
||||||
this.drawerTitle = '查看'
|
|
||||||
this.lookData = JSON.parse(JSON.stringify(row))
|
|
||||||
this.formOption = JSON.parse(JSON.stringify(row))
|
|
||||||
this.viewDrawer = true
|
|
||||||
},
|
|
||||||
resetForm(formName) {
|
resetForm(formName) {
|
||||||
this.$refs[formName].resetFields();
|
this.$refs[formName].resetFields();
|
||||||
this.viewDrawer = false
|
this.viewDrawer = false
|
||||||
},
|
},
|
||||||
/* 表格方法 */
|
|
||||||
onLoad(page, params = {}) {
|
|
||||||
this.loading = true;
|
|
||||||
getList(
|
|
||||||
page.currentPage,
|
|
||||||
page.pageSize,
|
|
||||||
Object.assign(this.query, params)
|
|
||||||
).then((res) => {
|
|
||||||
this.data = res.data.data.records;
|
|
||||||
this.page.total = res.data.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
this.onLoad(this.page);
|
this.onLoad();
|
||||||
},
|
},
|
||||||
searchChange(params,done) {
|
searchChange(params, done) {
|
||||||
console.log(params);
|
console.log(params);
|
||||||
if (params.applTime) {
|
if (params.applTime) {
|
||||||
var val = JSON.parse(JSON.stringify(params.applTime))
|
var val = JSON.parse(JSON.stringify(params.applTime))
|
||||||
@@ -186,7 +185,7 @@ export default {
|
|||||||
this.query = params;
|
this.query = params;
|
||||||
console.log(this.query);
|
console.log(this.query);
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page, params);
|
this.onLoad();
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
currentChange(val) {
|
currentChange(val) {
|
||||||
@@ -196,9 +195,42 @@ export default {
|
|||||||
this.page.currentPage = 1
|
this.page.currentPage = 1
|
||||||
this.page.pageSize = val
|
this.page.pageSize = val
|
||||||
},
|
},
|
||||||
refreshChange () {
|
refreshChange() {
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page)
|
this.onLoad()
|
||||||
|
},
|
||||||
|
/* 表格方法 */
|
||||||
|
onLoad() {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
this.loading = true;
|
||||||
|
let params = {
|
||||||
|
current: this.page.currentPage,
|
||||||
|
size: this.page.pageSize,
|
||||||
|
...this.query,
|
||||||
|
}
|
||||||
|
let resData = await getList(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const {current, records, total, size} = resData.data.data
|
||||||
|
this.data = records;
|
||||||
|
this.page.total = total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
seeDetail(row) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let params = {
|
||||||
|
id: row.id
|
||||||
|
}
|
||||||
|
let resData = await getInfo(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
this.drawerTitle = '查看'
|
||||||
|
this.lookData = JSON.parse(JSON.stringify(resData.data.data))
|
||||||
|
this.formOption = JSON.parse(JSON.stringify(resData.data.data))
|
||||||
|
this.viewDrawer = true
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
368
src/views/manage/survey/index.vue
Normal file
368
src/views/manage/survey/index.vue
Normal file
@@ -0,0 +1,368 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container>
|
||||||
|
<avue-crud
|
||||||
|
:option="option"
|
||||||
|
:table-loading="loading"
|
||||||
|
:data="data"
|
||||||
|
:page.sync="page"
|
||||||
|
ref="crud"
|
||||||
|
@row-save="rowSave"
|
||||||
|
@row-del="rowDel"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@refresh-change="refreshChange"
|
||||||
|
@search-reset="searchReset"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
|
<template slot="status" slot-scope="{ row }">
|
||||||
|
<el-switch
|
||||||
|
:value="row.status"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
@change="changeStatus(row)"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
<template slot="menu" slot-scope="{row}">
|
||||||
|
<el-button size="small" type="text" @click="look(row)">
|
||||||
|
<i class="el-icon-view"></i>
|
||||||
|
查看回答
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
<Detail
|
||||||
|
:visible.sync="viewDrawer" :rowData="selectPushServiceData"
|
||||||
|
></Detail>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {dateFormat} from '@/util/date'
|
||||||
|
import Tinymce from "@/components/Tinymce";
|
||||||
|
import {
|
||||||
|
getList,
|
||||||
|
getInfo,
|
||||||
|
addEmploymentSurveyManage,
|
||||||
|
deleteEmploymentSurveyManage,
|
||||||
|
publishEmploymentSurveyManage
|
||||||
|
} from '@/api/manage/survey'
|
||||||
|
import Detail from './sub/detail.vue'
|
||||||
|
|
||||||
|
const initPages = {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 100,
|
||||||
|
}
|
||||||
|
const classEnum = {
|
||||||
|
"1": '一般投诉',
|
||||||
|
"2": '较难投诉',
|
||||||
|
"3": '困难投诉',
|
||||||
|
"4": '特殊投诉',
|
||||||
|
}
|
||||||
|
const classIsDeleted = {
|
||||||
|
0: '否',
|
||||||
|
1: '是',
|
||||||
|
}
|
||||||
|
const classStatus = {
|
||||||
|
0: '未发布',
|
||||||
|
1: '已发布',
|
||||||
|
2: '关闭'
|
||||||
|
}
|
||||||
|
const classEnumList = Object.keys(classEnum).map((item) => ({
|
||||||
|
label: classEnum[item], value: item
|
||||||
|
}))
|
||||||
|
const classEnumDeleted = Object.keys(classIsDeleted).map((item) => ({
|
||||||
|
label: classIsDeleted[item], value: Number(item)
|
||||||
|
}))
|
||||||
|
const classEnumStatus = Object.keys(classStatus).map((item) => ({
|
||||||
|
label: classStatus[item], value: Number(item)
|
||||||
|
}))
|
||||||
|
const columnList = [
|
||||||
|
{
|
||||||
|
label: "机构名称",
|
||||||
|
prop: "companyName",
|
||||||
|
search: true,
|
||||||
|
addDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "调研题目",
|
||||||
|
prop: "surveyTitle",
|
||||||
|
span: 24,
|
||||||
|
search: true,
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "输入调研题目",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "调研内容",
|
||||||
|
prop: "surveyContent",
|
||||||
|
span: 24,
|
||||||
|
search: true,
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "输入调研内容",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否删除",
|
||||||
|
prop: "isDeleted",
|
||||||
|
type: "select",
|
||||||
|
addDisplay: false,
|
||||||
|
dicData: classEnumDeleted,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否已读",
|
||||||
|
prop: "isRead",
|
||||||
|
addDisplay: false,
|
||||||
|
type: "select",
|
||||||
|
dicData: classEnumDeleted,
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "创建人",
|
||||||
|
prop: "createUser",
|
||||||
|
addDisplay: false,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "创建部门",
|
||||||
|
prop: "createDept",
|
||||||
|
addDisplay: false,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "调研时间",
|
||||||
|
prop: "surveyTime",
|
||||||
|
addDisplay: false,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "创建时间",
|
||||||
|
prop: "createTime",
|
||||||
|
addDisplay: false,
|
||||||
|
type: 'datetime',
|
||||||
|
searchSpan: 8,
|
||||||
|
searchRange: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否发布",
|
||||||
|
prop: "status",
|
||||||
|
type: "select",
|
||||||
|
addDisplay: false,
|
||||||
|
dicData: classEnumStatus,
|
||||||
|
search: true,
|
||||||
|
slot: true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const rules = {
|
||||||
|
name: [
|
||||||
|
{required: true, message: '请输入内容标题', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{required: true, message: '请选择分类', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
content: [
|
||||||
|
{required: true, message: '请输入内容', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: "index",
|
||||||
|
components: {
|
||||||
|
Tinymce,
|
||||||
|
Detail
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
applTime: '',
|
||||||
|
loading: false,
|
||||||
|
viewDrawer: false,
|
||||||
|
drawerTitle: '新增内容',
|
||||||
|
formOption: {},
|
||||||
|
query: {},
|
||||||
|
rules: Object.assign({}, rules),
|
||||||
|
data: [],
|
||||||
|
lookData: {},
|
||||||
|
classEnum,
|
||||||
|
page: Object.assign({}, initPages),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
option() {
|
||||||
|
return {
|
||||||
|
height: "auto",
|
||||||
|
tip: false,
|
||||||
|
searchShow: true,
|
||||||
|
searchMenuSpan: 6,
|
||||||
|
border: true,
|
||||||
|
index: true,
|
||||||
|
indexLabel: "序号",
|
||||||
|
selectPushServiceData: null,
|
||||||
|
selection: false,
|
||||||
|
viewBtn: true,
|
||||||
|
addBtn: true,
|
||||||
|
editBtn: false,
|
||||||
|
viewBtnText: "查看调研",
|
||||||
|
delBtn: true,
|
||||||
|
columnBtn: false,
|
||||||
|
menuWidth: 300,
|
||||||
|
labelWidth: 151,
|
||||||
|
dialogClickModal: false,
|
||||||
|
dialogType: "drawer",
|
||||||
|
dialogFullscreen: true,
|
||||||
|
column: columnList,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
dateFormat,
|
||||||
|
look(row) {
|
||||||
|
this.selectPushServiceData = row
|
||||||
|
this.viewDrawer = true
|
||||||
|
},
|
||||||
|
resetForm(formName) {
|
||||||
|
this.$refs[formName].resetFields();
|
||||||
|
this.viewDrawer = false
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad();
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
console.log(params);
|
||||||
|
if (params.applTime) {
|
||||||
|
var val = JSON.parse(JSON.stringify(params.applTime))
|
||||||
|
params.applTimeStart = val[0] + " 00:00:00";
|
||||||
|
params.applTimeEnd = val[1] + " 23:59:59";
|
||||||
|
delete params.applTime
|
||||||
|
}
|
||||||
|
this.query = params;
|
||||||
|
console.log(this.query);
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad();
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
async changeStatus(row) {
|
||||||
|
const status = row.status ? 0 : 1
|
||||||
|
let params = {id: row.id, status}
|
||||||
|
console.log(params)
|
||||||
|
let resData = await publishEmploymentSurveyManage(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
this.$message.success('状态修改成功');
|
||||||
|
this.onLoad()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
currentChange(val) {
|
||||||
|
this.page.currentPage = val
|
||||||
|
},
|
||||||
|
sizeChange(val) {
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.page.pageSize = val
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
rowDel(row) {
|
||||||
|
const h = this.$createElement;
|
||||||
|
this.$confirm(
|
||||||
|
h("div", null, [
|
||||||
|
h("p", {style: "font-size: 16px"}, "您确定要删除此问卷吗? "),
|
||||||
|
h("p", {style: "color: red"}, "一旦删除则无法找回"),
|
||||||
|
]),
|
||||||
|
{
|
||||||
|
type: "warning",
|
||||||
|
showClose: false,
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
beforeClose: async (action, instance, done) => {
|
||||||
|
if (action === "confirm") {
|
||||||
|
let resData = await deleteEmploymentSurveyManage({id: row.id})
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
this.onLoad()
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
done()
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
rowSave(row, done, loading) {
|
||||||
|
const params = {
|
||||||
|
surveyTitle: row.surveyTitle,
|
||||||
|
surveyContent: row.surveyContent,
|
||||||
|
};
|
||||||
|
addEmploymentSurveyManage(params).then(
|
||||||
|
() => {
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.onLoad();
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "操作成功!",
|
||||||
|
});
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
window.console.log(error);
|
||||||
|
loading();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/* 表格方法 */
|
||||||
|
onLoad() {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
this.loading = true;
|
||||||
|
let params = {
|
||||||
|
current: this.page.currentPage,
|
||||||
|
size: this.page.pageSize,
|
||||||
|
...this.query,
|
||||||
|
}
|
||||||
|
let resData = await getList(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const {current, records, total, size} = resData.data.data
|
||||||
|
this.data = records;
|
||||||
|
this.page.total = total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
seeDetail(row) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let params = {
|
||||||
|
id: row.id
|
||||||
|
}
|
||||||
|
let resData = await getInfo(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
this.drawerTitle = '查看'
|
||||||
|
this.lookData = JSON.parse(JSON.stringify(resData.data.data))
|
||||||
|
this.formOption = JSON.parse(JSON.stringify(resData.data.data))
|
||||||
|
this.viewDrawer = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
167
src/views/manage/survey/sub/detail.vue
Normal file
167
src/views/manage/survey/sub/detail.vue
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
title="问卷回答列表"
|
||||||
|
:visible.sync="viewDrawer"
|
||||||
|
append-to-body
|
||||||
|
size="100%"
|
||||||
|
>
|
||||||
|
<avue-crud
|
||||||
|
:option="option"
|
||||||
|
:table-loading="loading"
|
||||||
|
:data="data"
|
||||||
|
:page.sync="page"
|
||||||
|
ref="crud"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@refresh-change="refreshChange"
|
||||||
|
@search-reset="searchReset"
|
||||||
|
>
|
||||||
|
|
||||||
|
</avue-crud>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getQueryEmploymentSurveyUserBySurveyId,
|
||||||
|
} from '@/api/manage/survey'
|
||||||
|
|
||||||
|
const initPages = {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 100,
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
visible: Boolean,
|
||||||
|
rowData: {default: null, type: Function},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
viewDrawer: {
|
||||||
|
get() {
|
||||||
|
return this.visible;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit("update:visible", val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
option() {
|
||||||
|
return {
|
||||||
|
size: 'medium',
|
||||||
|
dateBtn: false,
|
||||||
|
addBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
height: "auto",
|
||||||
|
reserveSelection: false,
|
||||||
|
border: true,
|
||||||
|
columnBtn: false,
|
||||||
|
refreshBtn: false,
|
||||||
|
menu: false,
|
||||||
|
tip: false,
|
||||||
|
selection: true,
|
||||||
|
searchMenuSpan: 6,
|
||||||
|
align: 'center',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: '应答人',
|
||||||
|
prop: 'replyName',
|
||||||
|
search: true,
|
||||||
|
}, {
|
||||||
|
label: '回复内容',
|
||||||
|
prop: 'replyContent',
|
||||||
|
}, {
|
||||||
|
label: '用户电话',
|
||||||
|
prop: 'replyPhone',
|
||||||
|
search: true,
|
||||||
|
}, {
|
||||||
|
label: '手机号',
|
||||||
|
prop: 'surveyContent',
|
||||||
|
search: true,
|
||||||
|
}, {
|
||||||
|
label: '创建人',
|
||||||
|
prop: 'createUser',
|
||||||
|
}, {
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'createTime',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
viewDrawer(val) {
|
||||||
|
val ? this.onPageLoad() : null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
data: [],
|
||||||
|
page: Object.assign({}, initPages),
|
||||||
|
query: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onPageLoad() {
|
||||||
|
if (!this.rowData) return
|
||||||
|
console.log('row2', this.rowData)
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad();
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
currentChange(val) {
|
||||||
|
this.page.currentPage = val
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
sizeChange(val) {
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.page.pageSize = val
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.page.currentPage = 1
|
||||||
|
this.onLoad();
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
if (!this.rowData) return
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let params = {
|
||||||
|
surveyId: this.rowData.id,
|
||||||
|
current: this.page.currentPage,
|
||||||
|
size: this.page.pageSize,
|
||||||
|
...this.query,
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
let resData = await getQueryEmploymentSurveyUserBySurveyId(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const {current, records, total, size} = resData.data.data
|
||||||
|
this.data = records;
|
||||||
|
this.page.total = total;
|
||||||
|
this.loading = false;
|
||||||
|
resolve()
|
||||||
|
} else {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -23,7 +23,7 @@ module.exports = {
|
|||||||
port: 1888,
|
port: 1888,
|
||||||
proxy: {
|
proxy: {
|
||||||
"/api": {
|
"/api": {
|
||||||
target: 'http://localhost:8000',
|
target: 'http://10.165.0.173:8000',
|
||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
|||||||
Reference in New Issue
Block a user