diff --git a/src/api/xq/feedback.js b/src/api/xq/feedback.js new file mode 100644 index 0000000..8101932 --- /dev/null +++ b/src/api/xq/feedback.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询留言举报列表 +export function listFeedback(query) { + return request({ + url: '/xq/feedback/list', + method: 'get', + params: query + }) +} + +// 查询留言举报详细 +export function getFeedback(id) { + return request({ + url: '/xq/feedback/' + id, + method: 'get' + }) +} + +// 新增留言举报 +export function addFeedback(data) { + return request({ + url: '/xq/feedback', + method: 'post', + data: data + }) +} + +// 修改留言举报 +export function updateFeedback(data) { + return request({ + url: '/xq/feedback', + method: 'put', + data: data + }) +} + +// 删除留言举报 +export function delFeedback(id) { + return request({ + url: '/xq/feedback/' + id, + method: 'delete' + }) +} diff --git a/src/components/CaiDictTag/index.vue b/src/components/CaiDictTag/index.vue index 49668f7..de174f4 100644 --- a/src/components/CaiDictTag/index.vue +++ b/src/components/CaiDictTag/index.vue @@ -32,6 +32,14 @@ export default { default: null, }, value: [Number, String, Array, Boolean], + splitValue: { + type: String, + default: null + }, + splitValueType: { + type: String, + default: 'int' + }, emptyValue: { type: String, default: '' @@ -42,12 +50,27 @@ export default { computed: { values() { if (this.value !== null && typeof this.value !== 'undefined') { - return Array.isArray(this.value) ? this.value : [this.value]; + if(Array.isArray(this.value)){ + return this.value + }else if(typeof this.value === "string" && this.splitValue){ + return this.stringToArray(this.value,this.splitValue,this.splitValueType) + }else{ + return [this.value] + } } else { return []; } }, }, + methods: { + stringToArray(data,splitValue,splitValueType){ + let split = data.split(splitValue) + if(splitValueType && splitValueType === 'int'){ + return split.map(str => parseInt(str)); + } + return split; + } + } }; diff --git a/src/views/xq/feedback/index.vue b/src/views/xq/feedback/index.vue new file mode 100644 index 0000000..116fbf4 --- /dev/null +++ b/src/views/xq/feedback/index.vue @@ -0,0 +1,336 @@ + + + diff --git a/src/views/xq/userInfo/index.vue b/src/views/xq/userInfo/index.vue index 354b3c4..5fd0953 100644 --- a/src/views/xq/userInfo/index.vue +++ b/src/views/xq/userInfo/index.vue @@ -32,7 +32,7 @@ - + @@ -76,10 +76,14 @@ - - - - + + + + + +