|
@@ -38,8 +38,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
<div class="content-w">
|
|
<div class="content-w">
|
|
|
<el-select v-model="extObj.type" class="m-2" placeholder="请选择作业类型" style="width: 240px">
|
|
<el-select v-model="extObj.type" class="m-2" placeholder="请选择作业类型" style="width: 240px">
|
|
|
- <el-option v-for="item in workTypeList" :key="item.dictValue" :label="item.dictLabel"
|
|
|
|
|
- :value="item.dictValue" />
|
|
|
|
|
|
|
+ <el-option v-for="item in workTypeList" :key="item.dictValue"
|
|
|
|
|
+ :label="item.dictLabel" :value="item.dictValue" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
@@ -80,7 +80,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<div class="content-w">
|
|
<div class="content-w">
|
|
|
- <el-select v-model="form.driverInfo" class="m-2" placeholder="请选择司机" style="width: 240px">
|
|
|
|
|
|
|
+ <el-select v-model="form.driverInfo" class="m-2" placeholder="请选择司机"
|
|
|
|
|
+ style="width: 240px">
|
|
|
<el-option v-for="item in sjList" :key="item.userId" :label="item.nickName"
|
|
<el-option v-for="item in sjList" :key="item.userId" :label="item.nickName"
|
|
|
:value="item.userId" />
|
|
:value="item.userId" />
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -129,9 +130,14 @@
|
|
|
<div v-if="activity.data != null">{{ activity.data.dictLabel }}</div>
|
|
<div v-if="activity.data != null">{{ activity.data.dictLabel }}</div>
|
|
|
<div v-if="activity.timeObj != null">{{ activity.timeObj.startTime }}-{{
|
|
<div v-if="activity.timeObj != null">{{ activity.timeObj.startTime }}-{{
|
|
|
activity.timeObj.endTime }}</div>
|
|
activity.timeObj.endTime }}</div>
|
|
|
- <div>
|
|
|
|
|
|
|
+ <div style="display: flex;flex-direction: row;">
|
|
|
<el-button style="width: 80px;" @click="selectSite(index)">选择地点</el-button>
|
|
<el-button style="width: 80px;" @click="selectSite(index)">选择地点</el-button>
|
|
|
<el-button style="width: 80px;" @click="selectTime(index)">选择时间</el-button>
|
|
<el-button style="width: 80px;" @click="selectTime(index)">选择时间</el-button>
|
|
|
|
|
+ <div style="margin-left:5px" @click="deleteItem(activity)">
|
|
|
|
|
+ <el-icon :size="20" style="color:red;padding-top: 10px;">
|
|
|
|
|
+ <CircleClose />
|
|
|
|
|
+ </el-icon>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-show="activity.isadd">
|
|
<div v-show="activity.isadd">
|
|
@@ -206,8 +212,8 @@ const carPathId = ref(null)
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
const carPathFormRef = ref<ElFormInstance>();
|
|
const carPathFormRef = ref<ElFormInstance>();
|
|
|
const extObj = ref({
|
|
const extObj = ref({
|
|
|
- type:null,
|
|
|
|
|
- wangge:null
|
|
|
|
|
|
|
+ type: null,
|
|
|
|
|
+ wangge: null
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const sjList = ref([])
|
|
const sjList = ref([])
|
|
@@ -347,18 +353,16 @@ const columns = ref([
|
|
|
|
|
|
|
|
const table = ref(tableElm)
|
|
const table = ref(tableElm)
|
|
|
|
|
|
|
|
-const submit = async() => {
|
|
|
|
|
- console.log(carObj.value);
|
|
|
|
|
|
|
+const submit = async () => {
|
|
|
var dataList = [];
|
|
var dataList = [];
|
|
|
- for(var index in activities.value){
|
|
|
|
|
- if(!activities.value[index].isadd){
|
|
|
|
|
|
|
+ for (var index in activities.value) {
|
|
|
|
|
+ if (!activities.value[index].isadd) {
|
|
|
dataList.push(activities.value[index]);
|
|
dataList.push(activities.value[index]);
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
form.value.stationList = JSON.stringify(dataList);
|
|
form.value.stationList = JSON.stringify(dataList);
|
|
|
form.value.ext2 = JSON.stringify(extObj.value)
|
|
form.value.ext2 = JSON.stringify(extObj.value)
|
|
|
form.value.ext1 = JSON.stringify(carObj.value);
|
|
form.value.ext1 = JSON.stringify(carObj.value);
|
|
|
- console.log(form.value);
|
|
|
|
|
if (form.value.id) {
|
|
if (form.value.id) {
|
|
|
await updateCarPath(form.value).finally(() => buttonLoading.value = false);
|
|
await updateCarPath(form.value).finally(() => buttonLoading.value = false);
|
|
|
} else {
|
|
} else {
|
|
@@ -367,14 +371,35 @@ const submit = async() => {
|
|
|
proxy?.$modal.msgSuccess("修改成功");
|
|
proxy?.$modal.msgSuccess("修改成功");
|
|
|
dialog.visible = false;
|
|
dialog.visible = false;
|
|
|
useTagsViewStore().delView(route);
|
|
useTagsViewStore().delView(route);
|
|
|
- router.back()
|
|
|
|
|
|
|
+ router.back()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const deleteItem = (obj) => {
|
|
|
|
|
+ activities.value = activities.value.filter(function (item) {
|
|
|
|
|
+ return item.rank !== obj.rank && item.rank != 998
|
|
|
|
|
+ });
|
|
|
|
|
+ for (var index in activities.value) {
|
|
|
|
|
+ activities.value[index].rank = Number(index) + 1
|
|
|
|
|
+ if (index == activities.value.length - 1) {
|
|
|
|
|
+ activities.value[index].rank = 999
|
|
|
|
|
+ activities.value[index].content = "终点"
|
|
|
|
|
+ activities.value[index].size = 'large'
|
|
|
|
|
+ activities.value[index].color = '#E37318'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ activities.value.push({
|
|
|
|
|
+ content: '2',
|
|
|
|
|
+ timestamp: '2018-04-03 20:46',
|
|
|
|
|
+ isadd: true,
|
|
|
|
|
+ rank: 998,
|
|
|
|
|
+ },);
|
|
|
|
|
+ activities.value.sort(function (a, b) { return a.rank - b.rank })
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const getDictsData = (param, obj) => {
|
|
const getDictsData = (param, obj) => {
|
|
|
- getDicts(param).then(res => {
|
|
|
|
|
- obj.value = res.data;
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ getDicts(param).then(res => {
|
|
|
|
|
+ obj.value = res.data;
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -382,11 +407,9 @@ const getUserList = async () => {
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
const res = await allocatedUserList({ pageSize: 1000, roleId: '1763484881548447746' });
|
|
const res = await allocatedUserList({ pageSize: 1000, roleId: '1763484881548447746' });
|
|
|
sjList.value = res.rows
|
|
sjList.value = res.rows
|
|
|
- console.log(sjList.value)
|
|
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
const ckres = await allocatedUserList({ pageSize: 1000, roleId: '1763484977044361217' });
|
|
const ckres = await allocatedUserList({ pageSize: 1000, roleId: '1763484977044361217' });
|
|
|
ckList.value = ckres.rows
|
|
ckList.value = ckres.rows
|
|
|
- console.log(ckList.value)
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const addSite = () => {
|
|
const addSite = () => {
|
|
@@ -405,7 +428,6 @@ const selectSite = (index) => {
|
|
|
|
|
|
|
|
const clickSite = (data) => {
|
|
const clickSite = (data) => {
|
|
|
activities.value[siteId.value].data = data;
|
|
activities.value[siteId.value].data = data;
|
|
|
- console.log(activities.value[siteId.value].data);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const selectTime = (index) => {
|
|
const selectTime = (index) => {
|
|
@@ -428,7 +450,7 @@ const getcarInfoList = async () => {
|
|
|
carInfoList.value = carList.rows
|
|
carInfoList.value = carList.rows
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const initData = async() =>{
|
|
|
|
|
|
|
+const initData = async () => {
|
|
|
let objId = route.query.id
|
|
let objId = route.query.id
|
|
|
carPathId.value = route.query.id
|
|
carPathId.value = route.query.id
|
|
|
await getDictsData('work_type', workTypeList);
|
|
await getDictsData('work_type', workTypeList);
|
|
@@ -439,16 +461,24 @@ const initData = async() =>{
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const setData = async(id) =>{
|
|
|
|
|
|
|
+const setData = async (id) => {
|
|
|
const res = await getCarPath(id);
|
|
const res = await getCarPath(id);
|
|
|
- console.log(res)
|
|
|
|
|
form.value = res.data
|
|
form.value = res.data
|
|
|
extObj.value = JSON.parse(res.data.ext2)
|
|
extObj.value = JSON.parse(res.data.ext2)
|
|
|
carObj.value = JSON.parse(res.data.ext1)
|
|
carObj.value = JSON.parse(res.data.ext1)
|
|
|
activities.value = JSON.parse(res.data.stationList)
|
|
activities.value = JSON.parse(res.data.stationList)
|
|
|
|
|
+ activities.value.push({
|
|
|
|
|
+ content: '2',
|
|
|
|
|
+ timestamp: '2018-04-03 20:46',
|
|
|
|
|
+ isadd: true,
|
|
|
|
|
+ rank: 998,
|
|
|
|
|
+ },);
|
|
|
|
|
+ activities.value.sort(function (a, b) { return a.rank - b.rank })
|
|
|
|
|
+ // activities.value[activities.value.length - 1].
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const goBack = () =>{
|
|
|
|
|
|
|
+const goBack = () => {
|
|
|
useTagsViewStore().delView(route);
|
|
useTagsViewStore().delView(route);
|
|
|
router.back();
|
|
router.back();
|
|
|
}
|
|
}
|