Commit 8edac09f authored by 王启林's avatar 王启林

增加反馈列表修改

parent 56c5f0ba
......@@ -15,7 +15,8 @@
</el-form-item>
<div style="text-align: center;">
<el-button size="small" @click="$router.back()">取消</el-button>
<el-button type="primary" size="small" @click="createForm('titleForm')">立即创建</el-button>
<el-button type="primary" size="small" @click="createForm('titleForm')">立即{{ !editStyle ? '创建' :
'修改' }}</el-button>
</div>
</el-form>
</div>
......@@ -25,6 +26,9 @@
<ElButton style="margin-left: 10px;" icon="el-icon-upload" type="primary" size="small"
@click="issueBtn" round>问卷发布
</ElButton>
<!-- <ElButton style="margin-left: 10px;" icon="el-icon-upload" type="primary" size="small"
@click="issueBtn" round>外部链接
</ElButton> -->
<ElButton icon="el-icon-view" type="success" size="small" @click="showDrawer" round>手机模拟预览
</ElButton>
</template>
......@@ -180,23 +184,27 @@ export default {
checkedUser: [],
checkAll: false,
checkAllArr: [],
editStyle: false,
}
},
mounted() {
this.getDeptData()
// let query = this.$route
// if (query.query.id) {
// this.feedbackId = query.query.id
// let editFeedback = JSON.parse(localStorage.getItem("editFeedback"))
// console.log(editFeedback)
// this.titleForm.title = editFeedback.title
// this.titleForm.remark = editFeedback.remark
// this.Frule = formCreate.parseJson(editFeedback.formContent)
// this.Fopthion = formCreate.parseJson(editFeedback.ruleContent)
// console.log(this.Frule, '***********', this.Fopthion)
// this.$refs.designer.setRule(this.Frule)
// this.$refs.designer.setOption(this.Fopthion)
// }
let query = this.$route
console.log(query)
if (query.query.id) {
this.editStyle = true
this.feedbackId = query.query.id
let editFeedback = JSON.parse(localStorage.getItem("editFeedback"))
console.log(editFeedback)
this.titleForm.title = editFeedback.title
this.titleForm.remark = editFeedback.remark
this.Frule = formCreate.parseJson(editFeedback.formContent)
this.Fopthion = formCreate.parseJson(editFeedback.ruleContent)
console.log(this.Frule, '***********', this.Fopthion)
this.$refs.designer.setRule(this.Frule)
this.$refs.designer.setOption(this.Fopthion)
}
},
methods: {
subUser() {
......@@ -207,6 +215,7 @@ export default {
this.$message.warning('请选择人员')
}
},
//人员全选
handleCheckAllChange(val) {
console.log(val, this.userOptions)
if (val) {
......@@ -331,7 +340,7 @@ export default {
this.$post('/feedback/save', sub).then(res => {
console.log(res)
if (res.code == 1) {
this.$message.success('新增表单成功');
this.$message.success(res.msg);
}
setTimeout(() => {
this.$router.back()
......@@ -374,17 +383,20 @@ export default {
this.$refs.designer.removeMenuItem("fc-editor")
this.$refs.designer.removeMenuItem("el-button")
this.$refs.designer.removeMenuItem("el-divider")
// 配置组件生成规则---直接配置显示在页面上
const rule = [{
"type": "span",
"title": this.titleForm.title,
"native": false,
"children": [this.titleForm.remark],
"_fc_drag_tag": "span",
"hidden": false,
"display": true
}]
this.$refs.designer.setRule(rule)
if (!this.editStyle) {
// 配置组件生成规则---直接配置显示在页面上
const rule = [{
"type": "span",
"title": this.titleForm.title,
"native": false,
"children": [this.titleForm.remark],
"_fc_drag_tag": "span",
"hidden": false,
"display": true
}]
this.$refs.designer.setRule(rule)
}
}
}
}
......
......@@ -92,15 +92,15 @@ export default {
{
label: "状态", prop: "processStatus", formatter: (row) => {
let str="未开始"
if(row.processStatus==1){
str="进行中"
}else if (row.processStatus==2){
str="已结束"
}
let str = "未开始"
if (row.processStatus == 1) {
str = "进行中"
} else if (row.processStatus == 2) {
str = "已结束"
}
return (
<el-tag type={row.processStatus ? row.processStatus == 2 ? 'success' : 'info' : 'danger'} size="small">
{str}
{str}
</el-tag>
)
}
......@@ -124,9 +124,16 @@ export default {
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd noEdit row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
if (row.processStatus == 0) {
return (
<table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
} else {
return (
<table-buttons noAdd noEdit row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
}
]
......
......@@ -73,7 +73,7 @@ export default {
tooltip: {},
xAxis: {
data: this.chartsData.map(i => {
console.log(i)
// console.log(i)
if(this.title == "申诉次数部门排名TOP20") return i.deptName
if(this.title == "申诉次数个人排名TOP20") return i.staffName
if(this.title == "申诉次数规则排名TOP20") return i.ruleName
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment