|
@@ -2,7 +2,7 @@
|
|
|
<div class="feedbackSubmit">
|
|
|
<div class="header">
|
|
|
<div class="title">
|
|
|
- <div class="back" @click='backFn'>
|
|
|
+ <div class="back" @click="backFn">
|
|
|
<van-icon name="arrow-left" size="20" />
|
|
|
</div>
|
|
|
<div class="text">问题反馈</div>
|
|
@@ -68,9 +68,14 @@ const formData = reactive({
|
|
|
},
|
|
|
})
|
|
|
const backFn = () => {
|
|
|
- history.go(-1)
|
|
|
+ history.go(-1)
|
|
|
+}
|
|
|
+const rules = {
|
|
|
+ name: [{ required: true, message: '请填写姓名' }],
|
|
|
+ companyName: [{ required: true, message: '请填写公司名称' }],
|
|
|
+ contactInformation: [{ required: true, message: '请填写联系方式' }],
|
|
|
+ problemStatement: [{ required: true, message: '请填写备注' }],
|
|
|
}
|
|
|
-const rules = {}
|
|
|
const formOption = reactive({
|
|
|
readonly: false, //用于控制整个表单是否只读
|
|
|
disabled: false,
|
|
@@ -90,79 +95,79 @@ const formConfig = reactive([
|
|
|
type: 'input',
|
|
|
itemType: 'text',
|
|
|
label: '公司名称',
|
|
|
- prop: 'name',
|
|
|
+ prop: 'companyName',
|
|
|
clearable: true,
|
|
|
},
|
|
|
{
|
|
|
type: 'input',
|
|
|
itemType: 'text',
|
|
|
label: '联系方式',
|
|
|
- prop: 'name',
|
|
|
+ prop: 'contactInformation',
|
|
|
clearable: true,
|
|
|
},
|
|
|
{
|
|
|
- type: 'picker',
|
|
|
+ type: 'cascader',
|
|
|
label: '模块类型',
|
|
|
- prop: 'keeperId',
|
|
|
- itemType: 'onePicker',
|
|
|
+ prop: 'moduleType',
|
|
|
+ itemType: 'common',
|
|
|
showPicker: false,
|
|
|
+ // data: classification.value,
|
|
|
+ data: [],
|
|
|
fieldNames: {
|
|
|
- text: 'name',
|
|
|
- value: 'id',
|
|
|
+ text: 'title',
|
|
|
+ value: 'name',
|
|
|
+ children: 'children',
|
|
|
},
|
|
|
- data: [
|
|
|
- {
|
|
|
- name: '模块1',
|
|
|
- id: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- name: '模块2',
|
|
|
- id: 2,
|
|
|
- },
|
|
|
- ],
|
|
|
},
|
|
|
{
|
|
|
type: 'input',
|
|
|
itemType: '问题说明',
|
|
|
label: '备注',
|
|
|
- prop: 'remark',
|
|
|
+ prop: 'problemStatement',
|
|
|
clearable: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ type: 'upload',
|
|
|
+ label: '图片补充',
|
|
|
+ prop: 'fileList',
|
|
|
+ },
|
|
|
])
|
|
|
-const getDict = async () => {
|
|
|
- await proxy
|
|
|
- .post('/dictTenantData/page', {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 999,
|
|
|
- tenantId: getUserInfo().tenantId,
|
|
|
- dictCode: 'warehouse_type',
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- formConfig[0].data = res.data.rows
|
|
|
- })
|
|
|
- await proxy
|
|
|
- .get('/tenantUser/list', {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10000,
|
|
|
- tenantId: getUserInfo().tenantId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- formConfig[1].data = res.rows
|
|
|
- })
|
|
|
+const routerData = ref([])
|
|
|
+const getRouter = () => {
|
|
|
+ proxy.get('getRouters', {}).then((res) => {
|
|
|
+ getRouterData(res.data)
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ const element = res.data[i]
|
|
|
+ if (element.type == 2) {
|
|
|
+ formConfig[3].data = element.children
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+//递归获取路由数据,初始化
|
|
|
+const getRouterData = (data) => {
|
|
|
+ data.forEach((item) => {
|
|
|
+ item.title = item.meta.title
|
|
|
+
|
|
|
+ if (item.children && item.children.length > 0) {
|
|
|
+ getRouterData(item.children)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
+getRouter()
|
|
|
const onClickLeft = () => history.back()
|
|
|
const onSubmit = () => {
|
|
|
- proxy
|
|
|
- .post('/warehouse/' + (!route.query.id ? 'add' : 'edit'), formData.data)
|
|
|
- .then(() => {
|
|
|
- showSuccessToast(!route.query.id ? '添加成功' : '编辑成功')
|
|
|
- setTimeout(() => {
|
|
|
- onClickLeft()
|
|
|
- }, 500)
|
|
|
- })
|
|
|
+ console.log(formData.data)
|
|
|
+ proxy.post('/problemFeedback/add', formData.data).then(() => {
|
|
|
+ showSuccessToast(!route.query.id ? '添加成功' : '编辑成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ onClickLeft()
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
}
|
|
|
onMounted(async () => {
|
|
|
- await getDict()
|
|
|
if (route.query.id) {
|
|
|
console.log(route.query.id)
|
|
|
proxy.post('/warehouse/detail', { id: route.query.id }).then((res) => {
|
|
@@ -197,6 +202,7 @@ onMounted(async () => {
|
|
|
top: -80px;
|
|
|
margin: 0 12px;
|
|
|
border-radius: 8px;
|
|
|
+ padding-bottom: 12px;
|
|
|
background: #fff;
|
|
|
.title {
|
|
|
height: 52px;
|