Преглед на файлове

登录密码默认值修改,批次数据行政区数据接入与样式调整

lkk преди 8 месеца
родител
ревизия
bc1500a037
променени са 2 файла, в които са добавени 74 реда и са изтрити 54 реда
  1. 1 1
      src/views/login.vue
  2. 73 53
      src/views/remote/satellite/index.vue

+ 1 - 1
src/views/login.vue

@@ -73,7 +73,7 @@ export default {
       codeUrl: "",
       loginForm: {
         username: "admin",
-        password: "admin123",
+        password: "123456",
         rememberMe: false,
         code: "",
         uuid: ""

+ 73 - 53
src/views/remote/satellite/index.vue

@@ -9,12 +9,14 @@
       label-width="68px"
     >
       <el-form-item label="行政区">
-        <el-input
-          v-model="queryParams.xzqdm"
-          placeholder="请输入名称"
-          clearable
-          @keyup.enter.native="handleQuery"
+        <!-- <el-col :span="4"> -->
+          <treeselect
+            v-model="form.xzqdm"
+            :options="deptOptions"
+            :normalizer="normalizer"
+            placeholder="选择行政区"
         />
+      <!-- </el-col> -->
       </el-form-item>
 
       <el-form-item label="活动时间">
@@ -62,7 +64,14 @@
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-upload" @click="fileUploadHandle" size="mini">上传</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-upload"
+          @click="fileUploadHandle"
+          size="mini"
+          >上传</el-button
+        >
       </el-col>
       <!-- <el-col :span="1.5">
         <el-button
@@ -257,8 +266,9 @@
         :limit="1"
         accept=".zip"
         :file-list="fileList"
-        :show-file-list=true
-        multiple>
+        :show-file-list="true"
+        multiple
+      >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
         <div class="el-upload__tip" slot="tip">只能上传zip文件</div>
@@ -276,8 +286,12 @@ import {
   updatePcsj,
   tiffUpload,
 } from "@/api/supervise/pcsj";
+import { listDept } from "@/api/system/dept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
   name: "Pcsj",
+  components: { Treeselect },
   data() {
     return {
       // 遮罩层
@@ -294,14 +308,14 @@ export default {
       total: 0,
       // 监管批次数据表格数据
       pcsjList: [
-        {
-          name: "", //文件名称
-          xzqdm: "", //区县名称
-          spotsnumber: "", //图斑个数
-          spotsarea: "", //监测面积(亩)
-          spotssize: "", //文件大小
-          filetime: "", //录入时间
-        },
+        // {
+        //   name: "", //文件名称
+        //   xzqdm: "", //区县名称
+        //   spotsnumber: "", //图斑个数
+        //   spotsarea: "", //监测面积(亩)
+        //   spotssize: "", //文件大小
+        //   filetime: "", //录入时间
+        // },
       ],
       // 弹出层标题
       title: "",
@@ -337,50 +351,47 @@ export default {
       rules: {},
       fileList: [],
       fileUploadDiv: false, //文件上传弹窗
-      loading2:null,
+      loading2: null,
       uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/uploadSpotZip",
+      // 部门树选项
+      deptOptions: [],
     };
   },
   created() {
     this.getList();
+    this.getDept();
   },
   methods: {
+    getDept() {
+      // 查询参数
+      let queryParams = {
+        deptName: undefined,
+        status: undefined,
+      };
+      listDept(queryParams).then((res) => {
+        this.deptOptions = this.handleTree(res.data, "deptId");
+        //  this.normalizer(res.data)
+        console.log(this.deptOptions, "responseresponse");
+      });
+    },
+    handleChange() {},
+    /** 转换部门数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.deptId,
+        label: node.deptName,
+        children: node.children,
+      };
+    },
     fileUploadHandle() {
       console.log(this.uploadFileUrl);
-      this.uploadFileUrl= this.uploadFileUrl;
-      this.fileList=[];
+      this.uploadFileUrl = this.uploadFileUrl;
+      this.fileList = [];
       this.fileUploadDiv = true;
     },
-    //上传文件
-    handleChange(file, fileList) {
-      console.log("handleChange ****")
-     
-      // if (fileList.length > 0) {
-      //   this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
-      //   this.reset();
-      // }
-      // console.log(file, "filefile");
-      // const formdata = new FormData();
-      // formdata.append("file", file.raw);
-      // // this.loading2 = true;
-      // this.loading2 = this.$loading({
-      //   lock: true,
-      //   text: "文件上传中",
-      //   spinner: "el-icon-loading",
-      //   background: "rgba(0, 0, 0, 0.7)",
-      // });
-      // /file/uploadSpotZip
-      // process.env.VUE_APP_BASE_API + "/file/uploadSpotZip"
-      // tiffUpload(formdata).then((res) => {
-      //   if (res.success) {
-      //     // this.loading2 = false;
-      //     this.loading2.close();
-      //     this.fileUpload = false;
-      //     this.getList();
-      //     this.$message.success(res.message);
-      //   }
-      // });
-    },
     handleBeforeUpload(file) {
       this.$modal.loading("正在上传文件,请稍候...");
       return true;
@@ -390,10 +401,10 @@ export default {
       this.$modal.msgError("上传文件失败,请重试");
       this.$modal.closeLoading();
     },
-     // 上传成功回调
-     handleUploadSuccess(res, file) {
-      console.log("handleUploadSuccess")
-      this.fileList=[];
+    // 上传成功回调
+    handleUploadSuccess(res, file) {
+      console.log("handleUploadSuccess");
+      this.fileList = [];
       this.fileUploadDiv = false;
       this.$modal.closeLoading();
       this.$modal.msgSuccess(res.message);
@@ -523,3 +534,12 @@ export default {
   },
 };
 </script>
+<style lang="scss" scoped>
+::v-deep .el-form-item--medium .el-form-item__label{
+  font-size: 11px;
+}
+::v-deep .vue-treeselect{
+  display: table-caption !important;
+  width: 200px;
+}
+</style>