|
@@ -0,0 +1,70 @@
|
|
|
+<template>
|
|
|
+ <hc-sys class="hc-add-work-order-page" :isNavBar="false">
|
|
|
+ <uni-section title="请选择您需要反馈的问题类型" type="line" class="mt-0.5">
|
|
|
+ <view class="p-3 pt-0" v-if="typeData.length > 0">
|
|
|
+ <uni-segmented-control :current="typeKey" :values="typeData" @clickItem="typeItemChange" />
|
|
|
+ </view>
|
|
|
+ </uni-section>
|
|
|
+
|
|
|
+ <!--底部操作栏-->
|
|
|
+ <HcTabbarBlock :height="70"/>
|
|
|
+ <hc-tabbars class="flex items-center">
|
|
|
+ <button hover-class="none" class="cu-btn flex-1 bg-blue-5 text-white">提交工单</button>
|
|
|
+ </hc-tabbars>
|
|
|
+ </hc-sys>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import {ref} from "vue";
|
|
|
+import mainApi from '~api/other/work-order';
|
|
|
+import {onLoad} from '@dcloudio/uni-app'
|
|
|
+import {errorToast, successToast} from "@/utils/tools";
|
|
|
+import {getArrValue, getObjValue} from "js-fast-way";
|
|
|
+import {useAppStore} from "@/store";
|
|
|
+
|
|
|
+//初始变量
|
|
|
+const store = useAppStore()
|
|
|
+const projectId = ref(store.projectId);
|
|
|
+const contractId = ref(store.contractId);
|
|
|
+
|
|
|
+onLoad(() => {
|
|
|
+ queryDictBizList()
|
|
|
+})
|
|
|
+
|
|
|
+//获取字典信息
|
|
|
+const typeDataBiz = ref([])
|
|
|
+const queryDictBizList = async () => {
|
|
|
+ const {error, code, data} = await mainApi.queryDictBizList()
|
|
|
+ if (!error && code === 200) {
|
|
|
+ let newArr = [], arr = getArrValue(data);
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ newArr.push(arr[i].dictValue)
|
|
|
+ }
|
|
|
+ typeKey.value = 0
|
|
|
+ typeData.value = newArr
|
|
|
+ typeDataBiz.value = arr
|
|
|
+ } else {
|
|
|
+ typeKey.value = 0
|
|
|
+ typeData.value = []
|
|
|
+ typeDataBiz.value = []
|
|
|
+ }
|
|
|
+ console.log(typeData.value)
|
|
|
+}
|
|
|
+
|
|
|
+//问题类型
|
|
|
+const typeKey = ref(0)
|
|
|
+const typeData = ref([])
|
|
|
+const typeItemChange = ({currentIndex}) => {
|
|
|
+ typeKey.value = currentIndex
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+page {
|
|
|
+ background: #EFEFF4;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+@import "@/style/work-order/index.scss";
|
|
|
+</style>
|