修改下发任务
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="任务" width="80%" :model-value="modelValue" destroy-on-close :close-on-click-modal="false" @close="close">
|
<el-dialog title="任务" width="80%" :model-value="modelValue" destroy-on-close :close-on-click-modal="false"
|
||||||
|
@close="close">
|
||||||
<el-form ref="elform" :model="listQuery" :rules="rules" :inline="true" label-position="top">
|
<el-form ref="elform" :model="listQuery" :rules="rules" :inline="true" label-position="top">
|
||||||
<el-form-item prop="dwmc" label="点位名称" style="width: 100%">
|
<el-form-item prop="dwmc" label="点位名称" style="width: 100%">
|
||||||
<el-input v-model="listQuery.dwmc" clearable style="width: 100%" />
|
<el-input v-model="listQuery.dwmc" clearable style="width: 100%" />
|
||||||
@ -27,8 +28,8 @@
|
|||||||
import emitter from "@/utils/eventBus.js";
|
import emitter from "@/utils/eventBus.js";
|
||||||
import GdMap from "@/components/Map/GdMap/index.vue";
|
import GdMap from "@/components/Map/GdMap/index.vue";
|
||||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||||
import { ref,reactive,defineProps,defineEmits,onMounted,onUnmounted,watch,getCurrentInstance } from "vue";
|
import { ref, reactive, defineProps, defineEmits, onMounted, onUnmounted, watch, getCurrentInstance } from "vue";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -41,13 +42,13 @@ const props = defineProps({
|
|||||||
default: {}
|
default: {}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:modelValue","submit"]);
|
const emits = defineEmits(["update:modelValue", "submit"]);
|
||||||
const dialogFormVisible = ref(false); //表单禁用
|
const dialogFormVisible = ref(false); //表单禁用
|
||||||
const listQuery = ref({}); //表单
|
const listQuery = ref({}); //表单
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
dwmc: [{ required: true, message: "请输入点位名称", trigger: "blur" }],
|
dwmc: [{ required: true, message: "请输入点位名称", trigger: "blur" }],
|
||||||
jd: [{ required: true, message: "请输入经度", trigger: ["blur",'change'] }],
|
jd: [{ required: true, message: "请输入经度", trigger: ["blur", 'change'] }],
|
||||||
wd: [{ required: true, message: "请输入纬度", trigger: ["blur",'change'] }],
|
wd: [{ required: true, message: "请输入纬度", trigger: ["blur", 'change'] }],
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -58,20 +59,22 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
watch(() => props.modelValue,(val) => {
|
watch(() => props.modelValue, (val) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dialogFormVisible.value = true;
|
dialogFormVisible.value = true;
|
||||||
showFg()
|
showFg()
|
||||||
}, 1000);
|
}, 500);
|
||||||
|
},{
|
||||||
|
deep: true, immediate: true
|
||||||
});
|
});
|
||||||
|
|
||||||
function showFg(){
|
function showFg() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const position = [
|
const position = [
|
||||||
[Number(props.data[0].x1), Number(props.data[0].y1)],
|
[Number(props.data[0].x1), Number(props.data[0].y1)],
|
||||||
[Number(props.data[0].x2), Number(props.data[0].y2)]
|
[Number(props.data[0].x2), Number(props.data[0].y2)]
|
||||||
];
|
];
|
||||||
const obj = [{ position: position,text:props.data[0].fgmc,id:1 ,userData:props.data[0]}];
|
const obj = [{ position: position, text: props.data[0].fgmc, id: 1, userData: props.data[0] }];
|
||||||
emitter.emit("echoPlane", {
|
emitter.emit("echoPlane", {
|
||||||
fontColor: "#12fdb8",
|
fontColor: "#12fdb8",
|
||||||
coords: obj,
|
coords: obj,
|
||||||
@ -80,8 +83,8 @@ function showFg(){
|
|||||||
color: "rgba(2,20,51,0.5)",
|
color: "rgba(2,20,51,0.5)",
|
||||||
linecolor: "#1C97FF"
|
linecolor: "#1C97FF"
|
||||||
});
|
});
|
||||||
emitter.emit("setMapCenter",{location:[Number(props.data[0].zxX), Number(props.data[0].zxY)],zoomLevel:12})
|
emitter.emit("setMapCenter", { location: [Number(props.data[0].zxX), Number(props.data[0].zxY)], zoomLevel: 12 })
|
||||||
},2000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取经纬度
|
//获取经纬度
|
||||||
@ -95,7 +98,7 @@ function chackLat() {
|
|||||||
const submit = () => {
|
const submit = () => {
|
||||||
|
|
||||||
if (listQuery.value.jd && listQuery.value.wd && listQuery.value.dwmc) {
|
if (listQuery.value.jd && listQuery.value.wd && listQuery.value.dwmc) {
|
||||||
emits("submit",listQuery.value);
|
emits("submit", listQuery.value);
|
||||||
close("新增成功");
|
close("新增成功");
|
||||||
} else {
|
} else {
|
||||||
proxy.$message({ type: "error", message: "请选择经纬度或者输入点位名称" });
|
proxy.$message({ type: "error", message: "请选择经纬度或者输入点位名称" });
|
||||||
@ -103,7 +106,8 @@ const submit = () => {
|
|||||||
};
|
};
|
||||||
// 关闭
|
// 关闭
|
||||||
const close = () => {
|
const close = () => {
|
||||||
listQuery.value={}
|
listQuery.value = {}
|
||||||
|
dialogFormVisible.value = false;
|
||||||
emits("update:modelValue", false);
|
emits("update:modelValue", false);
|
||||||
};
|
};
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
@ -20,8 +20,8 @@
|
|||||||
<el-step title="步骤2" />
|
<el-step title="步骤2" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-form ref="elform" :model="listQuery" :rules="rules" :inline="true" label-position="top" v-if="stepActive == 0">
|
<el-form ref="elform" :model="listQuery" :rules="rules" :inline="true" label-position="top" v-if="stepActive == 0">
|
||||||
<el-form-item style="width: 48%" prop="rwmc" label="任务名称">
|
<el-form-item style="width: 48%" prop="fgRwbt" label="任务名称">
|
||||||
<el-input v-model="listQuery.rwmc" placeholder="请输入任务名称" style="width: 100%" clearable />
|
<el-input v-model="listQuery.fgRwbt" placeholder="请输入任务名称" style="width: 100%" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 45%" label="方格" prop="fgData">
|
<el-form-item style="width: 45%" label="方格" prop="fgData">
|
||||||
<div :class="listQuery.fgData.length === 0 ? 'ipt mj' : 'ipt'" @click.stop="fgVisible = true">
|
<div :class="listQuery.fgData.length === 0 ? 'ipt mj' : 'ipt'" @click.stop="fgVisible = true">
|
||||||
@ -31,6 +31,9 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item style="width: 48%" prop="dkjgsj" label="间隔时间">
|
||||||
|
<el-input v-model="listQuery.dkjgsj" type="number" placeholder="请输入间隔时间" style="width: 100%" clearable />
|
||||||
|
</el-form-item>
|
||||||
<div class="center-btn"><el-button style="margin-top: 12px" @click="next">下一步</el-button></div>
|
<div class="center-btn"><el-button style="margin-top: 12px" @click="next">下一步</el-button></div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="box_main" v-if="stepActive == 1">
|
<div class="box_main" v-if="stepActive == 1">
|
||||||
@ -56,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FgLoad v-model="fgVisible" @choosedUsers="hanlderChoose" :Single="true" />
|
<FgLoad v-model="fgVisible" @choosedUsers="hanlderChoose" :Single="true" />
|
||||||
<AddDw v-model="showDialog" :data="listQuery.fgData"
|
<AddDw v-model="showDialog" v-if="showDialog" :data="listQuery.fgData"
|
||||||
:dic="{ D_ZDXL_FGXLRW_YJYS, D_ZDXL_FGXLRW_YJDJ, D_ZDXL_FGXLRW_RWZT }" @submit="dwSubmit" />
|
:dic="{ D_ZDXL_FGXLRW_YJYS, D_ZDXL_FGXLRW_YJDJ, D_ZDXL_FGXLRW_RWZT }" @submit="dwSubmit" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -89,8 +92,9 @@ const loading = ref(false);
|
|||||||
const elform = ref();
|
const elform = ref();
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
rwmc: [{ required: true, message: "请输入任务名称", trigger: "change" }],
|
fgRwbt: [{ required: true, message: "请输入任务名称", trigger: "change" }],
|
||||||
fgData: [{ required: true, message: "请选择方格", trigger: "change" }],
|
fgData: [{ required: true, message: "请选择方格", trigger: "change" }],
|
||||||
|
dkjgsj: [{ required: true, message: "请输入间隔时间", trigger: "change" }],
|
||||||
sblx: [{ required: true, message: "请选择任务类型", trigger: "change" }],
|
sblx: [{ required: true, message: "请选择任务类型", trigger: "change" }],
|
||||||
jd: [{ required: true, message: "请选择坐标", trigger: ["change", "blur"] }]
|
jd: [{ required: true, message: "请选择坐标", trigger: ["change", "blur"] }]
|
||||||
});
|
});
|
||||||
@ -179,8 +183,9 @@ const submit = () => {
|
|||||||
console.log(listQuery.value, pageData.tableData);
|
console.log(listQuery.value, pageData.tableData);
|
||||||
|
|
||||||
const pramas = {
|
const pramas = {
|
||||||
fgRwbt: listQuery.value.rwmc,
|
fgRwbt: listQuery.value.fgRwbt,
|
||||||
fgdwId: listQuery.value.fgData[0].id,
|
fgdwId: listQuery.value.fgData[0].id,
|
||||||
|
dkjgsj:listQuery.value.dkjgsj,
|
||||||
bddDtos: pageData.tableData.map(item => {
|
bddDtos: pageData.tableData.map(item => {
|
||||||
return {
|
return {
|
||||||
bddMc: item.dwmc,
|
bddMc: item.dwmc,
|
||||||
|
|||||||
@ -20,11 +20,11 @@
|
|||||||
<div class="tabBox">
|
<div class="tabBox">
|
||||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" :tableConfiger="pageData.tableConfiger"
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" :tableConfiger="pageData.tableConfiger"
|
||||||
:controlsWidth="pageData.controlsWidth" @chooseData="chooseData">
|
:controlsWidth="pageData.controlsWidth" @chooseData="chooseData">
|
||||||
<template #rwZt="{ row }">
|
<template #rwLqZt="{ row }">
|
||||||
<!-- <el-table-column prop="wlq" label="未领取"/>
|
<!-- <el-table-column prop="wlq" label="未领取"/>
|
||||||
<el-table-column prop="ylq" label="已领取"/>
|
<el-table-column prop="ylq" label="已领取"/>
|
||||||
<el-table-column prop="ywc" label="已完成"/> -->
|
<el-table-column prop="ywc" label="已完成"/> -->
|
||||||
<dict-tag :options="D_BZ_QWRWZT" :value="row.rwZt" :tag="false" />
|
<dict-tag :options="D_BZ_QWRWZT" :value="row.rwLqZt" :tag="false" />
|
||||||
</template>
|
</template>
|
||||||
<template #controls="{ row }">
|
<template #controls="{ row }">
|
||||||
<!-- 领取后不可再编辑,领取后不可再删除 -->
|
<!-- 领取后不可再编辑,领取后不可再删除 -->
|
||||||
@ -39,7 +39,7 @@
|
|||||||
}"></Pages>
|
}"></Pages>
|
||||||
</div>
|
</div>
|
||||||
<!-- 编辑-新增 -->
|
<!-- 编辑-新增 -->
|
||||||
<EditAddForm ref="editInfo" @updateDate="getDataList" :dic="{D_BZ_SBLX,D_BZ_GZSBLX}"></EditAddForm>
|
<EditAddForm ref="editInfo" @updateDate="getDataList" :dic="{D_BZ_QWRWZT}"></EditAddForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ import Pages from "@/components/aboutTable/Pages.vue";
|
|||||||
import Search from "@/components/aboutTable/Search.vue";
|
import Search from "@/components/aboutTable/Search.vue";
|
||||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { D_BZ_SBLX, D_BZ_GZSBLX,D_BZ_QWRWZT } = proxy.$dict("D_BZ_SBLX", "D_BZ_GZSBLX","D_BZ_QWRWZT");
|
const { D_BZ_QWRWZT } = proxy.$dict("D_BZ_QWRWZT");
|
||||||
const ids = ref([]); //多选
|
const ids = ref([]); //多选
|
||||||
const searchBox = ref(); //搜索框
|
const searchBox = ref(); //搜索框
|
||||||
const listQuery = ref({});
|
const listQuery = ref({});
|
||||||
@ -65,10 +65,11 @@ const searchConfiger = reactive([
|
|||||||
label: "任务名称"
|
label: "任务名称"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
showType: "input",
|
showType: "select",
|
||||||
prop: "sbbh",
|
prop: "rwLqZt",
|
||||||
placeholder: "请输入任务编号",
|
placeholder: "请选择任务领取状态",
|
||||||
label: "任务编号"
|
label: "任务领取状态",
|
||||||
|
options: D_BZ_QWRWZT
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
@ -89,7 +90,7 @@ const pageData = reactive({
|
|||||||
{ label: "方格编号", prop: "fgMc" },
|
{ label: "方格编号", prop: "fgMc" },
|
||||||
{ label: "下发日期", prop: "xtCjsj" },
|
{ label: "下发日期", prop: "xtCjsj" },
|
||||||
{ label: "任务领取人", prop: "rwlqr" },
|
{ label: "任务领取人", prop: "rwlqr" },
|
||||||
{ label: "任务状态", prop: "rwZt", showSolt: true },
|
{ label: "任务领取状态", prop: "rwLqZt", showSolt: true },
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -137,10 +138,10 @@ const chooseData = (val) => {
|
|||||||
//批量删除
|
//批量删除
|
||||||
const deletList = (id) => {
|
const deletList = (id) => {
|
||||||
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
|
proxy.$confirm("确定要删除", "警告", { type: "warning" }).then(() => {
|
||||||
// qcckDelete({}, "/mosty-yszx/tbYsSxt/" + id).then(() => {
|
qcckPost({id}, "/mosty-yjzl/tbZdxlFgxlrw/delZdyxlFgxlrw").then(() => {
|
||||||
// proxy.$message({ type: "success", message: "删除成功" });
|
proxy.$message({ type: "success", message: "删除成功" });
|
||||||
// getDataList();
|
getDataList();
|
||||||
// });
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
proxy.$message.info("已取消");
|
proxy.$message.info("已取消");
|
||||||
});
|
});
|
||||||
|
|||||||
@ -3,8 +3,8 @@ const path = require("path");
|
|||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir);
|
return path.join(__dirname, dir);
|
||||||
}
|
}
|
||||||
// const serverHost = "http://118.122.165.45:35623";
|
const serverHost = "http://118.122.165.45:35623";
|
||||||
const serverHost = "http://192.168.31.94:8006";
|
// const serverHost = "http:// 192.168.31.79:8006";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
|
|||||||
Reference in New Issue
Block a user