|
@@ -0,0 +1,265 @@
|
|
|
+<template>
|
|
|
+ <div class="tpwjxm">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-input
|
|
|
+ v-model="pageObj.xmmc"
|
|
|
+ placeholder="请输入项目名称"
|
|
|
+ class="input-style"
|
|
|
+ size="mini"
|
|
|
+ @input="changeForm"
|
|
|
+ >
|
|
|
+ <!-- <i slot="suffix" class="el-input__icon el-icon-search"></i> -->
|
|
|
+ <el-button slot="append" icon="el-icon-search"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1">
|
|
|
+ <div class="max-width" style="height: 10px"></div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="13">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="pageObj.sj"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ class="datepicker"
|
|
|
+ size="mini"
|
|
|
+ @change="changedate"
|
|
|
+ :default-time="defaultTime1"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="listDiv">
|
|
|
+ <div
|
|
|
+ class="dataItem"
|
|
|
+ v-for="(item, dindex) in datalist"
|
|
|
+ :key="item.objectid"
|
|
|
+ @click="zoomItem(item)"
|
|
|
+ >
|
|
|
+ <div>{{ dindex + 1 }}项目名称:{{ item.xmlx }}</div>
|
|
|
+ <div>建设单位:{{ item.jsdw }}</div>
|
|
|
+ <div>
|
|
|
+ <el-tag type="warning" size="mini" v-if="item.rwzt == 0">创建</el-tag>
|
|
|
+ <el-tag size="mini" v-if="item.rwzt == 1">执行中</el-tag>
|
|
|
+ <el-tag type="success" size="mini" v-if="item.rwzt == 2">完成</el-tag>
|
|
|
+ <el-tag type="danger" size="mini" v-if="item.rwzt == 3">错误</el-tag>
|
|
|
+ <div class="btns">
|
|
|
+ <el-button type="primary" size="mini" @click.stop="checkRz(item)"
|
|
|
+ >日志</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click="checkDetails(item)"
|
|
|
+ >结果</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="item.fxbg"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click.stop="report(item)"
|
|
|
+ >报告</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button
|
|
|
+ size="mini"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ @click.stop="del(item)"
|
|
|
+ v-if="item.rwzt == 2 || item.rwzt == 3"
|
|
|
+ >删除</el-button
|
|
|
+ > -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+// import { GetPage, GetFxjg, Delect } from "@/api/ghss/hgxfx.js";
|
|
|
+// import myMap from "@/utils/map.js";
|
|
|
+// import arcMap from "@/utils/arcMap.js";
|
|
|
+let parent;
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ rzBsm: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ activeTabs: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ scjgObj: {
|
|
|
+ type: Object,
|
|
|
+ },
|
|
|
+ tempObj: {
|
|
|
+ type: Object,
|
|
|
+ },
|
|
|
+ rwBsm: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ loading: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ rzMc: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageObj: {
|
|
|
+ kssj: "",
|
|
|
+ sj: [],
|
|
|
+ jssj: "",
|
|
|
+ xmmc: "",
|
|
|
+ },
|
|
|
+ defaultTime1: [
|
|
|
+ new Date(2023, 1, 1, 0, 0, 0),
|
|
|
+ new Date(2023, 2, 1, 23, 59, 59),
|
|
|
+ ], // '00:00:00', '23:59:59'
|
|
|
+ datalist: [{ rwzt: 2, fxbg: "w" }],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // this.getData();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ report(item) {
|
|
|
+ window.open(item.fxbg.replace(".docx", ".pdf"), "_blank");
|
|
|
+ },
|
|
|
+ del(item) {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ "该操作将会删除此数据且不可恢复,您确定要删除吗?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ Delect({ bsm: item.bsm }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ ElMessage.success("删除成功!");
|
|
|
+ this.changeForm();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ checkDetails(item) {
|
|
|
+ // parent.emit("update:rwBsm", item.bsm);
|
|
|
+ // GetFxjg({ bsm: item.bsm }).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // parent.emit("update:scjgObj", JSON.parse(JSON.stringify(res.data)));
|
|
|
+ // parent.emit("update:activeTabs", "scjg");
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ checkRz(item) {
|
|
|
+ parent.emit("update:rzMc", item.xmmc);
|
|
|
+ parent.emit("update:rzBsm", item.bsm);
|
|
|
+ },
|
|
|
+
|
|
|
+ changeForm() {
|
|
|
+ this.pageObj.page = 1;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ changedate(val) {
|
|
|
+ if (val) {
|
|
|
+ this.pageObj.kssj = proxy.$comfun.setDate(val)[0];
|
|
|
+ this.pageObj.jssj = proxy.$comfun.setDate(val)[1];
|
|
|
+ } else {
|
|
|
+ this.pageObj.kssj = "";
|
|
|
+ this.pageObj.jssj = "";
|
|
|
+ }
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+
|
|
|
+ getData() {
|
|
|
+ parent.emit("update:loading", true);
|
|
|
+ GetPage({ ...this.pageObj }).then((res) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ parent.emit("update:loading", false);
|
|
|
+ }, 100);
|
|
|
+ this.pageObj.total = res.recordstotal;
|
|
|
+ this.pageObj.page = res.page;
|
|
|
+ this.pageObj.allpage = res.totalpages;
|
|
|
+ this.datalist = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ zoomItem(item) {
|
|
|
+ if (myMap.getLayer("fzxz_layer")) {
|
|
|
+ myMap.getLayer("fzxz_layer").getSource().clear();
|
|
|
+ }
|
|
|
+ myMap.tempLayers.dview_search_Layer.getSource().clear();
|
|
|
+ arcMap.SearchWfsFilter2(
|
|
|
+ `${SYS_LAYERS.FZXZ}/1/query`,
|
|
|
+ `RWBSM='${item.bsm}'`,
|
|
|
+ function (fs) {
|
|
|
+ myMap.tempLayers.dview_search_Layer.getSource().addFeatures(fs);
|
|
|
+ if (fs.length == 1) {
|
|
|
+ myMap.onLocation(fs[0]);
|
|
|
+ } else {
|
|
|
+ myMap.zoomToextent(
|
|
|
+ myMap.tempLayers.dview_search_Layer.getSource().getExtent()
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ // watch(
|
|
|
+ // () => prop.rzBsm,
|
|
|
+ // (newValue, oldValue) => {
|
|
|
+ // this.changeForm();
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tpwjxm {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .datepicker {
|
|
|
+ width: 100% !important;
|
|
|
+ span {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .listDiv {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 40px);
|
|
|
+ padding-top: 10px;
|
|
|
+ overflow-x: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ color: #fff;
|
|
|
+ line-height: 40px;
|
|
|
+
|
|
|
+ .dataItem {
|
|
|
+ height: 150px;
|
|
|
+ border: 1px dashed #02a7f0;
|
|
|
+ padding: 10px 20px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .dataItem:hover {
|
|
|
+ border: 1px solid #02a7f0;
|
|
|
+ }
|
|
|
+ .btns {
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ bottom: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|