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

增加反馈列表修改

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