|
|
@@ -9,7 +9,7 @@
|
|
|
style="font-family: PingFang SC;font-size: 14px;font-weight: normal;line-height: 19px;height: 19px;margin-left: 8px;">路线作业</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="warning" @click="">取消</el-button>
|
|
|
+ <el-button type="warning" @click="goBack()">取消</el-button>
|
|
|
<el-button type="primary" @click="submit()">保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -179,6 +179,7 @@ import { CarInfoVO, CarInfoQuery, CarInfoForm } from '@/api/carInfo/types';
|
|
|
import tableElm from "@/components/Public/table.vue";
|
|
|
import mapDiv from "@/components/Map/index.vue"
|
|
|
import { allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role";
|
|
|
+import useTagsViewStore from '@/store/modules/tagsView';
|
|
|
import { getDicts } from '@/api/system/dict/data'
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
@@ -200,6 +201,7 @@ const timeData = ref();
|
|
|
const carInfoList = ref<CarInfoVO[]>([])
|
|
|
const type = ref(null)
|
|
|
const workTypeList = ref([])
|
|
|
+const carPathId = ref(null)
|
|
|
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
const carPathFormRef = ref<ElFormInstance>();
|
|
|
@@ -424,10 +426,33 @@ const getcarInfoList = async () => {
|
|
|
carInfoList.value = carList.rows
|
|
|
}
|
|
|
|
|
|
+const initData = async() =>{
|
|
|
+ let objId = route.query.id
|
|
|
+ carPathId.value = route.query.id
|
|
|
+ await getDictsData('work_type', workTypeList);
|
|
|
+ await getcarInfoList();
|
|
|
+ await getUserList();
|
|
|
+ if (objId != 0 && objId != null) {
|
|
|
+ setData(objId)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const setData = async(id) =>{
|
|
|
+ const res = await getCarPath(id);
|
|
|
+ console.log(res)
|
|
|
+ form.value = res.data
|
|
|
+ extObj.value = JSON.parse(res.data.ext2)
|
|
|
+ carObj.value = JSON.parse(res.data.ext1)
|
|
|
+ activities.value = JSON.parse(res.data.stationList)
|
|
|
+}
|
|
|
+
|
|
|
+const goBack = () =>{
|
|
|
+ useTagsViewStore().delView(route);
|
|
|
+ router.back();
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
- getDictsData('work_type', workTypeList);
|
|
|
- getcarInfoList();
|
|
|
- getUserList();
|
|
|
+ initData()
|
|
|
});
|
|
|
|
|
|
</script>
|