-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ $t('query') }}
@@ -13,15 +37,15 @@
-
+
-
+
- 查看
+ 查看
回复
@@ -40,6 +64,9 @@
+
@@ -48,6 +75,7 @@
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './suggestionmake-add-or-update'
import suggestionfeedbackAddOrUpdate from './suggestionfeedback-add-or-update'
+import suggestionmakeDetail from './suggestionmake-detail'
export default {
mixins: [mixinViewModule],
data () {
@@ -59,11 +87,67 @@ export default {
deleteIsBatch: true
},
dataForm: {
- id: ''
+ id: '',
+ allDeptIds: '',
+ suggestionTypeId: ''
},
- feedbackVisible: false
+ options: [],
+ optionSuggestionType: [],
+ ids: [],
+ typeIds: [],
+ optionIsFeedback: [{
+ value: '0',
+ label: '未回复'
+ },{
+ value: '1',
+ label: '已回复'
+ }],
+ feedbackVisible: false,
+ detailVisible: false
+ }
+ },
+ watch: {
+ 'ids': function (val) {
+ if (val.length === 0) {
+ this.dataForm.allDeptIds = ''
+ }
+ if (val.length === 1) {
+ this.dataForm.allDeptIds = this.ids[0]
+ }
+ if (val.length === 2) {
+ this.dataForm.allDeptIds = this.ids[0] + ',' + this.ids[1]
+ }
+ if (val.length === 3) {
+ this.dataForm.allDeptIds = this.ids[0] + ',' + this.ids[1] + ',' + this.ids[2]
+ }
+ },
+ 'typeIds': function (val) {
+ if (val.length === 0) {
+ this.dataForm.suggestionTypeId = ''
+ }
+ if (val.length === 1) {
+ this.dataForm.suggestionTypeId = this.typeIds[0]
+ }
+ if (val.length === 2) {
+ this.dataForm.suggestionTypeId = this.typeIds[1]
+ }
+ if (val.length === 3) {
+ this.dataForm.suggestionTypeId = this.typeIds[2]
+ }
}
},
+ created () {
+ this.$http
+ .get(`/sys/user/deptOptions/getByLoginUser`)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.options = res.data.options
+ })
+ .catch(() => { })
+ this.getListSuggestionType()
+ },
methods: {
formatFeedback (row, column) {
if (row.isFeedback === '0') {
@@ -72,18 +156,33 @@ export default {
return '已回复'
}
},
+ getListSuggestionType () {
+ this.$http.get(`/custom/suggestiontype/getSuggestionTypeTree`).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.optionSuggestionType = res.data
+ }).catch(() => {})
+ },
feedbackHandle (id) {
- console.log(id)
this.feedbackVisible = true
this.$nextTick(() => {
this.$refs.suggestionfeedbackAddOrUpdate.dataForm.suggestionId = id
this.$refs.suggestionfeedbackAddOrUpdate.init()
})
+ },
+ detailHandle (id) {
+ this.detailVisible = true
+ this.$nextTick(() => {
+ this.$refs.suggestionmakeDetail.dataForm.id = id
+ this.$refs.suggestionmakeDetail.init()
+ })
}
},
components: {
AddOrUpdate,
- suggestionfeedbackAddOrUpdate
+ suggestionfeedbackAddOrUpdate,
+ suggestionmakeDetail
}
}