asd26269546 1 سال پیش
والد
کامیت
507cbed1c3
2فایلهای تغییر یافته به همراه66 افزوده شده و 59 حذف شده
  1. 10 9
      src/views/home/feedback.vue
  2. 56 50
      src/views/home/feedbackSubmit.vue

+ 10 - 9
src/views/home/feedback.vue

@@ -13,14 +13,14 @@
 	<van-search v-model="req.keyword"  placeholder="请输入搜索关键词" @search="onRefresh" />
 
 	<van-pull-refresh v-model="loading" @refresh="onRefresh" class="feedback">
-		<van-tabs v-model:active="active">
-            <van-tab title="全部">
+		<van-tabs v-model:active="req.status" @click-tab="onRefresh">
+            <van-tab title="全部" name="">
 
             </van-tab>
-            <van-tab title="待回复">
+            <van-tab title="待回复" name='0'>
                 
             </van-tab>
-            <van-tab title="已回复">
+            <van-tab title="已回复" name='1'>
 
             </van-tab>
         </van-tabs>
@@ -35,17 +35,17 @@
                 <ul>
                     <li v-for="i in listData" :key="i.id" @click="toDtl(i)">
                         <div class="title">
-                            反馈标题
+                            {{i.replyContent}}
                         </div>
                         <div class="time">
-                            2023-01-16 16:51
+                           {{i.createTime}}
                         </div>
                         <div class="status">
                             已回复
                         </div>
                     </li>
                 </ul>
-				<commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
+				
 			</van-list>
 		</div>
 	</van-pull-refresh>
@@ -59,7 +59,8 @@ const loading = ref(false)
 const router = useRoute()
 const req = ref({
 	pageNum:1,
-	keyword:null
+	keyword:null,
+	status:'',
 })
 const finished = ref(false);
 const proxy = getCurrentInstance().proxy
@@ -119,7 +120,7 @@ const getDict = () => {
 
 const getList = (type) => {
 	loading.value = true
-	proxy.post('/warehouse/page',req.value).then(res => {	
+	proxy.post('/problemFeedback/page',req.value).then(res => {	
 		res.data.rows.map(item => {
 			warehouseType.value.map(type => {
 				if(item.type == type.value) {

+ 56 - 50
src/views/home/feedbackSubmit.vue

@@ -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;