Pārlūkot izejas kodu

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

maxiaoxiao 10 mēneši atpakaļ
vecāks
revīzija
fcf3a2fccc

+ 8 - 0
src/api/kfgx/gxzy.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+export function GetByBsm(params) {
+    return request({
+        url: '/apply/yzt/zyml/GetByBsm',
+        method: 'get',
+        params
+    })
+}

+ 3 - 2
src/components/Combinations/LayerManage/LayerManageSplit.vue

@@ -96,7 +96,7 @@
                     : node.label
                 }}</span>
                 <span>
-                  <i class="el-icon-notebook-2" v-if="data.url != '' && $props.type == 'share'" @click="showDetail"></i>
+                  <i class="el-icon-notebook-2" v-if="data.url != '' && $props.type == 'share'" @click="showDetail(data)"></i>
                   <Icon
                     :type="!data.favorite ? 'ios-star-outline' : 'ios-star'"
                     color="green"
@@ -269,7 +269,8 @@ export default {
   },
 
   methods: {
-    showDetail(){
+    showDetail(data){
+      console.log(data,'woshidata');
       this.$emit("updateParent", "isShowService", true);
     },
     toggleVisibility() {

+ 40 - 58
src/views/farmlandProtection/components/fzjcyp.vue

@@ -25,7 +25,13 @@
         <el-button size="mini" @click="zdyModel">自定义模型</el-button>
       </div>
       <div class="treeDiv">
-        <el-table ref="multipleTable" :data="anaModels" style="width: 100%" :show-header="false" @selection-change="handleSelectionChange">
+        <el-table
+          ref="multipleTable"
+          :data="anaModels"
+          style="width: 100%"
+          :show-header="false"
+          @selection-change="handleSelectionChange"
+        >
           <el-table-column type="selection" width="33"> </el-table-column>
           <el-table-column prop="bsmmc" show-overflow-tooltip>
           </el-table-column>
@@ -44,7 +50,11 @@
       <span class="clearBtn" @click="reset">取消</span>
       <span class="sureBtn" @click="submitData">确定</span>
     </div>
-    <zdyModelPop :tableData="templateYZ" :editData="editData" ref="zdyPop"></zdyModelPop>
+    <zdyModelPop
+      :tableData="templateYZ"
+      :editData="editData"
+      ref="zdyPop"
+    ></zdyModelPop>
   </div>
 </template>
 
@@ -53,7 +63,7 @@ import range from "@/components/mapview/range.vue"; //绘制范围
 import zdyModelPop from "./zdyModelPop.vue"; //自定义模型面板
 import moment from "moment";
 import { Message } from "element-ui";
-import { GetMxList ,AddGdbh} from "../../../api/ghss/gdbh.js";
+import { GetMxList, AddGdbh } from "../../../api/ghss/gdbh.js";
 export default {
   components: {
     range,
@@ -77,47 +87,14 @@ export default {
         ],
       },
       //分析模型列表
-      anaModels: [
-      ],
+      anaModels: [],
+      anaModelsCopy:[],//用于存放分析模型初始数据
       templateYZ: [], //用地性质模版因子
-      editData:{},//编辑的对象
-      multipleSelection: []
+      editData: {}, //编辑的对象
+      multipleSelection: [],
     };
   },
   methods: {
-    testInit() {
-      this.templateYZ = [
-        {
-          id: "2fcc1664e6264bf8b3199bac7a4b22d4",
-          bsm: "TB_DLZX",
-          name: "城市道路",
-          level: 2,
-          parentId: "a83e3af0479c49f9bb229ce044e33d4d",
-          conditionInfo: null,
-        },
-        {
-          id: "aac6e14452ee48f6883afc5c047ea235",
-          bsm: "TB_QS_GYUSEQ",
-          name: "国有使用权",
-          level: 1,
-          parentId: "3ae55964b3744393b14bf0e7e647c280",
-          conditionInfo: null,
-        },
-        {
-          id: "bff0dcb5ffd04c3498067e566a5fc302",
-          bsm: "TB_YEY",
-          name: "幼儿园服务半径",
-          level: 1,
-          parentId: "12c81a1e8ba4487ea73f08b93b796b3d",
-          conditionInfo: null,
-        },
-      ];
-      this.templateYZ.forEach((item) => {
-        item.children = [];
-      });
-      this.anaModels = this.templateYZ;
-      this.$refs.zdyPop.yzTableData = this.templateYZ;
-    },
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
@@ -138,13 +115,16 @@ export default {
     //自定义模型按钮
     zdyModel() {
       this.$refs.zdyPop.dialogVisible = true;
-      this.editData={}
-      this.$refs.zdyPop.reset()
+      this.$refs.zdyPop.title = "自定义模型";
+      this.editData = {};
+      this.$refs.zdyPop.reset();
       this.$refs.zdyPop.yzTableData = [];
     },
     handleEdit(item) {
-      this.editData = item
+      this.editData = item;
+      this.$refs.zdyPop.title = "分析模型编辑";
       this.$refs.zdyPop.dialogVisible = true;
+      this.$refs.zdyPop.ruleForm.fxmxmc = item.bsmmc;
       this.templateYZ = item.gdbhMxYzRet;
       this.templateYZ.forEach((item) => {
         item.children = [];
@@ -159,6 +139,7 @@ export default {
         xzmj: 0,
         xmmc: "耕地保护项目_" + this.getCurrentDateTime(),
       };
+      this.anaModels = this.anaModelsCopy
       this.$refs.ruleForm.resetFields();
       this.$refs.multipleTable.clearSelection();
       this.$refs.range.reset();
@@ -176,7 +157,7 @@ export default {
           let obj = {
             xzfw: this.$refs.range.fileDataID,
             xmmc: this.ruleForm.xmmc,
-            mxlist:this.multipleSelection
+            mxlist: this.multipleSelection,
           };
 
           const loading = this.$loading({
@@ -192,20 +173,21 @@ export default {
             this.$refs.multipleTable.clearSelection();
           }, 1000);
           AddGdbh(obj)
-              .then((res) => {
-                loading.close();
-                this.activeTabs = "lsju";
-                this.$emit("updateParent", "activeTabs", "lsju");
-                this.$refs.multipleTable.clearSelection();
-                this.$message({
-                  message: res.message,
-                  type: res.success ? "success" : "warning",
-                });
-                this.reset();
-              }).catch((error) => {
-                loading.close();
-                Message.error(error)
+            .then((res) => {
+              loading.close();
+              this.activeTabs = "lsju";
+              this.$emit("updateParent", "activeTabs", "lsju");
+              this.$refs.multipleTable.clearSelection();
+              this.$message({
+                message: res.message,
+                type: res.success ? "success" : "warning",
               });
+              this.reset();
+            })
+            .catch((error) => {
+              loading.close();
+              Message.error(error);
+            });
         } else {
           loading.close();
           console.log("error submit!!");
@@ -217,6 +199,7 @@ export default {
       GetMxList()
         .then((res) => {
           this.anaModels = res.data;
+          this.anaModelsCopy = JSON.parse(JSON.stringify(res.data))
         })
         .catch((erro) => {
           console.log(erro);
@@ -225,7 +208,6 @@ export default {
   },
   mounted() {
     this.GetMxList();
-    // this.testInit()
   },
 };
 </script>

+ 65 - 23
src/views/farmlandProtection/components/zdyModelPop.vue

@@ -1,15 +1,33 @@
 <template>
   <div class="dialog">
-    <el-dialog title="自定义模型" :visible.sync="dialogVisible" width="40%" :before-close="close"
-      :modal-append-to-body="false" :close-on-click-modal="false">
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogVisible"
+      width="40%"
+      :before-close="close"
+      :modal-append-to-body="false"
+      :close-on-click-modal="false"
+    >
       <!-- <div class="modelTitle"> -->
       <!-- <div class="siteCon">
           <span>分析模型名称:</span>
         </div>
         <el-input v-model="fxmxmc" size="mini" placeholder="请输入项目名称"></el-input> -->
-      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px" class="demo-ruleForm">
+      <el-form
+        :model="ruleForm"
+        :rules="rules"
+        ref="ruleForm"
+        label-width="110px"
+        class="demo-ruleForm"
+      >
         <el-form-item label="分析模型名称:" prop="fxmxmc">
-          <el-input v-model="ruleForm.fxmxmc" size="mini" placeholder="请输入项目名称"></el-input></el-form-item></el-form>
+          <el-input
+            v-model="ruleForm.fxmxmc"
+            size="mini"
+            placeholder="请输入项目名称"
+            :disabled="title == '分析模型编辑' ? true : false"
+          ></el-input></el-form-item
+      ></el-form>
       <!-- </div> -->
 
       <el-row>
@@ -18,20 +36,41 @@
           <el-scrollbar class="left-tree">
             <el-input placeholder="输入查询内容" v-model="filterText" clearable>
             </el-input>
-            <el-tree :data="options" :props="defaultProps" highlight-current show-checkbox node-key="id" ref="tree"
-              :default-checked-keys="defaultArr" :filter-node-method="filterNode"></el-tree>
+            <el-tree
+              :data="options"
+              :props="defaultProps"
+              highlight-current
+              show-checkbox
+              node-key="id"
+              ref="tree"
+              :default-checked-keys="defaultArr"
+              :filter-node-method="filterNode"
+            ></el-tree>
           </el-scrollbar>
         </el-col>
         <el-col :span="2">
           <div class="grid-content bg_purple">
-            <el-button icon="el-icon-d-arrow-right" @click="turnLeftToRight"></el-button>
-            <el-button icon="el-icon-d-arrow-left" @click="turnRightToLeft"></el-button>
+            <el-button
+              icon="el-icon-d-arrow-right"
+              @click="turnLeftToRight"
+            ></el-button>
+            <el-button
+              icon="el-icon-d-arrow-left"
+              @click="turnRightToLeft"
+            ></el-button>
           </div>
         </el-col>
         <el-col :span="11">
           <div class="yztitle">已选数据</div>
-          <el-table ref="multipleTable" :data="dialogData" border class="right-table scroll-style" size="small"
-            style="width: 100%" @selection-change="handleSelectionChange">
+          <el-table
+            ref="multipleTable"
+            :data="dialogData"
+            border
+            class="right-table scroll-style"
+            size="small"
+            style="width: 100%"
+            @selection-change="handleSelectionChange"
+          >
             <el-table-column type="selection" width="55" align="center">
             </el-table-column>
             <el-table-column prop="name" label="数据名称"> </el-table-column>
@@ -62,6 +101,7 @@ export default {
 
   data() {
     return {
+      title: "自定义模型",
       // fxmxmc: "", //分析模型名称
       filterText: "", //树结构搜索关键字
       defaultProps: {
@@ -69,12 +109,17 @@ export default {
         label: "name",
       },
       ruleForm: {
-        fxmxmc: ""
+        fxmxmc: "",
       },
       rules: {
         fxmxmc: [
-          { required: true, message: '请输入活动名称', trigger: 'blur' },
-          { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
+          { required: true, message: "请输入活动名称", trigger: "blur" },
+          {
+            min: 1,
+            max: 20,
+            message: "长度在 1 到 20 个字符",
+            trigger: "blur",
+          },
         ],
       },
       dialogVisible: false,
@@ -105,11 +150,9 @@ export default {
       this.yzTableData = [];
       this.GetFactorList(); //重新获取分析数据
       this.dialogData = []; //清空已选数据表单
-      this.$nextTick(() =>{
-        this.$refs['ruleForm'].resetFields();
-
-      })
-
+      this.$nextTick(() => {
+        this.$refs["ruleForm"].resetFields();
+      });
     },
     testInput(val) {
       val = Number(val);
@@ -249,16 +292,15 @@ export default {
             this.$refs.multipleTable.clearSelection(); //清空勾选
           } else {
             this.$message({
-              message: '请选择分析数据',
-              type: 'warning'
+              message: "请选择分析数据",
+              type: "warning",
             });
           }
         } else {
-          console.log('error submit!!');
+          console.log("error submit!!");
           return false;
         }
       });
-
     },
     setData(data) {
       data.filter((item) => {
@@ -358,7 +400,7 @@ export default {
     justify-content: center;
     height: 400px;
 
-    .el-button+.el-button {
+    .el-button + .el-button {
       margin-left: 0;
       margin-top: 20px;
     }

+ 64 - 6
src/views/shareResources/components/ServiceDetails.vue

@@ -7,7 +7,7 @@
       </div>
       <div class="ServiceCon">
         <div class="detailList">
-          <el-descriptions title="自定义样式列表" :column="1" border>
+          <el-descriptions :column="1" border>
             <el-descriptions-item
               label="服务名称"
               label-class-name="my-label"
@@ -33,7 +33,7 @@
         </div>
         <div class="btnCon">
           <span @click="dialogVisible = true">申请调用</span>
-          <span><i>申请记录</i></span>
+          <span><i @click="dialogVisible2 = true">申请记录</i></span>
         </div>
       </div>
     </div>
@@ -131,6 +131,39 @@
         <el-button @click="resetForm('ruleForm')">确定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog
+      title="提示"
+      :visible.sync="dialogVisible2"
+      width="30%"
+      :before-close="handleClose"
+    >
+      <div>
+        <el-table :data="tableData" style="width: 100%">
+          <el-table-column prop="date" label="申请时间" >
+          </el-table-column>
+          <el-table-column prop="sqbm" label="申请部门" >
+          </el-table-column>
+          <el-table-column prop="sjfw" label="数据服务" >
+          </el-table-column>
+          <el-table-column prop="fwlx" label="服务类型" >
+          </el-table-column>
+          <el-table-column prop="sqfw" label="申请范围" >
+          </el-table-column>
+          <el-table-column prop="sqly" label="申请理由" >
+          </el-table-column>
+          <el-table-column prop="xtmc" label="系统名称"> </el-table-column>
+          <el-table-column prop="dyip" label="调用IP"> </el-table-column>
+          <el-table-column prop="yqTime" label="预期使用时间"> </el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible2 = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible2 = false"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -141,6 +174,7 @@ export default {
     return {
       isDetailsShow: false,
       dialogVisible: false,
+      dialogVisible2: false,
       xzqTreeData: [], //申请范围
       fileList: [], //文件
       ruleForm: {
@@ -165,10 +199,21 @@ export default {
         xzqTreeValue: [
           { required: true, message: "请选择申请范围", trigger: "change" },
         ],
-        dyip: [
-          { required: true, message: "请填写调用IP", trigger: "blur" },
-        ],
+        dyip: [{ required: true, message: "请填写调用IP", trigger: "blur" }],
       },
+      tableData: [
+        {
+          date: "2016-05-02",
+          sqbm: "研发部",
+          sjfw: "XXXXXX",
+          fwlx:'iServer',
+          sqfw:'吉阳区',
+          sqly:'申请理由',
+          xtmc:'系统名称',
+          dyip:'调用ip',
+          yqTime:'预期时间',
+        },
+      ],
     };
   },
   created() {
@@ -236,7 +281,7 @@ export default {
 <style lang="scss" scoped>
 .ServiceCon {
   height: 760px;
-  background-color: aliceblue;
+//   background-color: aliceblue;
   cursor: auto;
 
   .btnCon {
@@ -293,6 +338,19 @@ export default {
 .sm-panel {
   top: 38px;
 }
+
+/deep/ .el-icon-close:before{
+    right: 2px;
+    top: 0px;
+}
+/deep/ .el-descriptions-item__label.is-bordered-label{
+    color: #fff;
+    background-color: transparent;
+}
+/deep/ .el-descriptions__body{
+    color: #fff;
+    background-color: transparent;
+}
 </style>
 <style>
 .my-content {

+ 1 - 0
src/views/shareResources/index.vue

@@ -31,6 +31,7 @@ export default {
   data() {
     return {
       isShowService:false,
+      objData:null,
     };
   },
   mounted() {