lcw
This commit is contained in:
@ -3,6 +3,6 @@ module.exports = {
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
],
|
||||
plugins: [
|
||||
"@babel/plugin-proposal-optional-chaining"
|
||||
"@babel/plugin-transform-optional-chaining"
|
||||
]
|
||||
}
|
||||
|
||||
22014
package-lock.json
generated
22014
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,7 @@
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-optional-chaining": "^7.13.12",
|
||||
"@element-plus/icons": "^0.0.11",
|
||||
"@toast-ui/editor": "^3.0.2",
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
import GdMap from "@/components/Map/GdMap/index.vue";
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import { ref,reactive,defineProps,defineEmits,onMounted,onUnmounted,watch } from "vue";
|
||||
import { ref,reactive,defineProps,defineEmits,onMounted,onUnmounted,watch,getCurrentInstance } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
@ -92,14 +93,17 @@ function chackLat() {
|
||||
|
||||
// 提交
|
||||
const submit = () => {
|
||||
emits("submit", listQuery.value);
|
||||
close("新增成功");
|
||||
|
||||
if (listQuery.value.jd && listQuery.value.wd && listQuery.value.dwmc) {
|
||||
emits("submit",listQuery.value);
|
||||
close("新增成功");
|
||||
} else {
|
||||
proxy.$message({ type: "error", message: "请选择经纬度或者输入点位名称" });
|
||||
}
|
||||
};
|
||||
// 关闭
|
||||
const close = () => {
|
||||
listQuery.value.dwmc = "";
|
||||
listQuery.value.jd = "";
|
||||
listQuery.value.wd = "";
|
||||
listQuery.value={}
|
||||
emits("update:modelValue", false);
|
||||
};
|
||||
onUnmounted(() => {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<div class="head_box">
|
||||
<span class="title">{{ title }}</span>
|
||||
<div>
|
||||
<el-button type="primary" size="small" :loading="loading" @click="submit">保存</el-button>
|
||||
<!-- <el-button type="primary" size="small" :loading="loading" @click="submit">保存</el-button> -->
|
||||
<el-button size="small" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -51,16 +51,13 @@
|
||||
</MyTable>
|
||||
<div class="center-btn">
|
||||
<el-button style="margin-top: 12px" @click="stepActive--; pageData.tableData = []">上一步</el-button>
|
||||
<el-button style="margin-top: 12px" @click="stepActive--">提交</el-button>
|
||||
<el-button style="margin-top: 12px" @click="submit">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<FgLoad v-model="fgVisible" @choosedUsers="hanlderChoose" :Single="true" />
|
||||
<AddDw
|
||||
v-model="showDialog"
|
||||
:data="listQuery.fgData"
|
||||
:dic="{ D_ZDXL_FGXLRW_YJYS, D_ZDXL_FGXLRW_YJDJ, D_ZDXL_FGXLRW_RWZT }"
|
||||
@submit="dwSubmit" />
|
||||
<AddDw v-model="showDialog" :data="listQuery.fgData"
|
||||
:dic="{ D_ZDXL_FGXLRW_YJYS, D_ZDXL_FGXLRW_YJDJ, D_ZDXL_FGXLRW_RWZT }" @submit="dwSubmit" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -154,51 +151,65 @@ function hanlderChoose(arr) {
|
||||
return {
|
||||
id: item.id,
|
||||
fgmc: item.mc1,
|
||||
x1:item.x1,
|
||||
y1:item.y1,
|
||||
x2:item.x2,
|
||||
y2:item.y2,
|
||||
x11:item.x11,
|
||||
y11:item.y11,
|
||||
x21:item.x21,
|
||||
y21:item.y21 ,
|
||||
zxX:item.zxX,
|
||||
zxY:item.zxY,
|
||||
x1: item.x1,
|
||||
y1: item.y1,
|
||||
x2: item.x2,
|
||||
y2: item.y2,
|
||||
x11: item.x11,
|
||||
y11: item.y11,
|
||||
x21: item.x21,
|
||||
y21: item.y21,
|
||||
zxX: item.zxX,
|
||||
zxY: item.zxY,
|
||||
};
|
||||
});
|
||||
listQuery.value.fgData = jzryList;
|
||||
}
|
||||
|
||||
const dwSubmit = (val) => {
|
||||
console.log(val, 'val');
|
||||
pageData.tableData.push(val)
|
||||
}
|
||||
// 提交
|
||||
const submit = () => {
|
||||
elform.value.validate((valid) => {
|
||||
if (!valid) return false;
|
||||
loading.value = true;
|
||||
if (title.value == "新增任务") {
|
||||
qcckPost(listQuery.value, "/mosty-yszx/tbYsSxt/add")
|
||||
.then((res) => {
|
||||
proxy.$message({ type: "success", message: "新增成功" });
|
||||
close();
|
||||
emit("updateDate");
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
} else {
|
||||
qcckPut(listQuery.value, "/mosty-yszx/tbYsSxt/update")
|
||||
.then((res) => {
|
||||
proxy.$message({ type: "success", message: "修改成功" });
|
||||
close();
|
||||
emit("updateDate");
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
// elform.value.validate((valid) => {
|
||||
// if (!valid) return false;
|
||||
loading.value = true;
|
||||
if (title.value == "新增任务") {
|
||||
console.log(listQuery.value, pageData.tableData);
|
||||
|
||||
const pramas = {
|
||||
fgRwbt: listQuery.value.rwmc,
|
||||
fgdwId: listQuery.value.fgData[0].id,
|
||||
bddDtos: pageData.tableData.map(item => {
|
||||
return {
|
||||
bddMc: item.dwmc,
|
||||
jd: item.jd,
|
||||
wd: item.wd
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
qcckPost(pramas, "/mosty-yjzl/tbZdxlFgxlrw/addZdyxlFgxlrw")
|
||||
.then((res) => {
|
||||
proxy.$message({ type: "success", message: "新增成功" });
|
||||
close();
|
||||
emit("updateDate");
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
} else {
|
||||
// qcckPut(listQuery.value, "/mosty-yszx/tbYsSxt/update")
|
||||
// .then((res) => {
|
||||
// proxy.$message({ type: "success", message: "修改成功" });
|
||||
// close();
|
||||
// emit("updateDate");
|
||||
// })
|
||||
// .catch(() => {
|
||||
// loading.value = false;
|
||||
// });
|
||||
}
|
||||
// });
|
||||
};
|
||||
const deletList = (idx) => {
|
||||
console.log(idx, 'idx');
|
||||
|
||||
@ -20,10 +20,11 @@
|
||||
<div class="tabBox">
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" :tableConfiger="pageData.tableConfiger"
|
||||
:controlsWidth="pageData.controlsWidth" @chooseData="chooseData">
|
||||
<template #rwzt="{ row }">
|
||||
<el-table-column prop="wlq" label="未领取"/>
|
||||
<template #rwZt="{ row }">
|
||||
<!-- <el-table-column prop="wlq" 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" />
|
||||
</template>
|
||||
<template #controls="{ row }">
|
||||
<!-- 领取后不可再编辑,领取后不可再删除 -->
|
||||
@ -51,7 +52,7 @@ import Pages from "@/components/aboutTable/Pages.vue";
|
||||
import Search from "@/components/aboutTable/Search.vue";
|
||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_SBLX, D_BZ_GZSBLX } = proxy.$dict("D_BZ_SBLX", "D_BZ_GZSBLX");
|
||||
const { D_BZ_SBLX, D_BZ_GZSBLX,D_BZ_QWRWZT } = proxy.$dict("D_BZ_SBLX", "D_BZ_GZSBLX","D_BZ_QWRWZT");
|
||||
const ids = ref([]); //多选
|
||||
const searchBox = ref(); //搜索框
|
||||
const listQuery = ref({});
|
||||
@ -84,11 +85,11 @@ const pageData = reactive({
|
||||
}, //分页
|
||||
controlsWidth: 210, //操作栏宽度
|
||||
tableColumn: [
|
||||
{ label: "任务名称", prop: "sbmc" },
|
||||
{ label: "方格编号", prop: "sbbh" },
|
||||
{ label: "下发时间", prop: "xfcsj" },
|
||||
{ label: "任务名称", prop: "fgRwbt" },
|
||||
{ label: "方格编号", prop: "fgMc" },
|
||||
{ label: "下发日期", prop: "xtCjsj" },
|
||||
{ label: "任务领取人", prop: "rwlqr" },
|
||||
{ label: "任务状态", prop: "rwzt", showSolt: true },
|
||||
{ label: "任务状态", prop: "rwZt", showSolt: true },
|
||||
]
|
||||
});
|
||||
onMounted(() => {
|
||||
@ -106,18 +107,19 @@ const getDataList = () => {
|
||||
let pramas = {
|
||||
pageSize: pageData.pageConfiger.pageSize,
|
||||
pageCurrent: pageData.pageConfiger.pageNum,
|
||||
rwlx:3,
|
||||
...listQuery.value
|
||||
};
|
||||
// pageData.tableConfiger.loading = true;
|
||||
// qcckPost(pramas, "/mosty-yszx/tbYsSxt/getPageList")
|
||||
// .then((res) => {
|
||||
// pageData.tableData = res.records || [];
|
||||
// pageData.tableConfiger.loading = false;
|
||||
// pageData.total = res.total;
|
||||
// })
|
||||
// .catch(() => {
|
||||
// pageData.tableConfiger.loading = false;
|
||||
// });
|
||||
pageData.tableConfiger.loading = true;
|
||||
qcckGet(pramas, "/mosty-yjzl/tbZdxlFgxlrw/selectPage")
|
||||
.then((res) => {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.tableConfiger.loading = false;
|
||||
pageData.total = res.total;
|
||||
})
|
||||
.catch(() => {
|
||||
pageData.tableConfiger.loading = false;
|
||||
});
|
||||
};
|
||||
const changeNo = (val) => {
|
||||
pageData.pageConfiger.pageNum = val;
|
||||
|
||||
@ -3,8 +3,8 @@ const path = require("path");
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir);
|
||||
}
|
||||
const serverHost = "http://118.122.165.45:35623";
|
||||
// const serverHost = "http://192.168.3.105:8006";
|
||||
// const serverHost = "http://118.122.165.45:35623";
|
||||
const serverHost = "http://192.168.31.94:8006";
|
||||
|
||||
module.exports = {
|
||||
publicPath: "/",
|
||||
|
||||
Reference in New Issue
Block a user