Browse Source

新增用户编辑

mork 3 tuần trước cách đây
mục cha
commit
f7c50321e4
2 tập tin đã thay đổi với 77 bổ sung44 xóa
  1. 34 5
      src/components/yygl/editManage.vue
  2. 43 39
      src/views/yygl/monitor/index.vue

+ 34 - 5
src/components/yygl/editManage.vue

@@ -33,13 +33,33 @@
           </template>
 
           <!--文本内容  formItem.describe-->
-          <el-input
+
+           <el-input
+              v-if="['varchar', 'content', 'text'].indexOf(formItem.frontType) > -1"
+              v-model="dataForm[formItem.name]"
+              :type="formItem.itemType == 'password' ? 'password' : 'text'"
+              :placeholder="`请输入${formItem.alias}`"
+              :disabled="isView"
+            >
+              <!-- 后缀插槽:放置眼睛图标 -->
+              <template #suffix v-if="formItem.name == 'password'">
+                <el-icon
+                  class="cursor-pointer"
+                  @click="togglePassword(formItem)"
+                >
+                  <View v-if="showPassword" />
+                  <Hide v-else />
+                </el-icon>
+              </template>
+            </el-input>
+
+          <!-- <el-input
             v-if="['varchar', 'content', 'text'].indexOf(formItem.frontType) > -1"
             v-model="dataForm[formItem.name]"
             :type="formItem.name == 'password' ? 'password' : 'text'"
             :placeholder="`请输入${formItem.alias}`"
             :disabled="isView"
-          />
+          /> -->
           <!--日期时间  formItem.describe-->
           <span v-else-if="['date_time'].indexOf(formItem.frontType) > -1">
             <el-date-picker
@@ -482,7 +502,7 @@ export default {
       },
       modelFieldList: [],
       itemLists: {},
-
+      showPassword: false,
       map: {},
       currMapItem: {},
       isMapShow: true,
@@ -533,7 +553,8 @@ export default {
       } else if (["select", "multiple_select"].indexOf(obj.frontType) > -1) {
         this.getCheckItems(obj, 2);
       }
-      // console.log("==========" + obj);
+      console.log("==========" + obj);
+      obj.itemType = obj.name;
       this.modelFieldList.push(obj);
     }
     // 有序
@@ -657,6 +678,14 @@ export default {
       await navigator.clipboard.writeText(JSON.stringify(that.geoJsons));
       this.$message({ message: "复制成功", type: "success" });
     },
+    togglePassword(formItem) {
+      if(this.showPassword){
+        formItem.itemType = "password";
+      }else{
+        formItem.itemType = "text";
+      }
+      this.showPassword = !this.showPassword;
+    },
     changeValue(json) {
       let that = this;
       let Icon = L.divIcon({
@@ -1352,7 +1381,7 @@ export default {
                     that.column.modelId == systemConfig.modelIds[1]
                   ) {
                     //指定 一张图登录栏目 申请账号时使用判断
-                    message = "申请成功!请等待三个工作日,管理员审核通过后,您才能登录系统。";
+                    message = "申请成功!请等待三个工作日,管理员审核通过后,您才能登录系统。";
                   }
                   that.$message({ message: message, type: "success" });
                 } else {

+ 43 - 39
src/views/yygl/monitor/index.vue

@@ -442,43 +442,6 @@ export default {
       // });
     },
     getDmsDataList() {
-      let requestParams = {
-        columnId: systemConfig.columnIds[1], // 应用中心栏目id
-        states: 0,
-        orderBy: JSON.stringify([{ field: "create_time", orderByType: 2 }]),
-        pageSize: 9999,
-        page: 0,
-      };
-      appCenter.getDmsDataList(requestParams).then((res) => {
-        if (res.code === 200) {
-          this.itemApplications = res.content.data.map((item) => ({
-            ...item,
-            status:
-              item.status === 0
-                ? "待审核"
-                : item.status === 1
-                  ? "待发布"
-                  : item.status === 2
-                    ? "未完成"
-                    : "已完成",
-            buffName:
-              this.buffOptions.find((info) => info.label == item.appbuff.trim())?.value || "",
-            appstautName:
-              this.statusOptions.find((info) => info.label == item.appstauts.trim())?.value || "",
-            createTime: moment(item.create_time).format("YYYY-MM-DD HH:mm:ss"),
-          }));
-          this.applications = this.itemApplications;
-          // this.selectAapplications = this.applications.filter((item) => item.yylx == "0"); //yylx 0:内部 1:外部
-          this.newApplications = this.applications.slice(0, 10); // 获取前十个元素
-          // this.selectedAppRange = this.applications[0].title;
-          this.getTypeArrs();
-          this.getCountAppInfo();
-        } else {
-          this.applications = [];
-          this.selectAapplications = [];
-          this.selectedAppRange = "";
-        }
-      });
 
       let param = {
         start: "2000-01-01",
@@ -487,10 +450,51 @@ export default {
       getAppList(param.start, param.end).then((res) => {
         // console.log("=======getAppList======"+res);
         this.selectAapplications = res;
-        this.selectedAppRange = this.selectAapplications[0].name;
+        this.selectAapplications.forEach((item) => {
+          if(item.name.includes("华新镇")){
+              this.selectedAppRange = item.name;
+              return;
+          }
+        });
 
+        let requestParams = {
+          columnId: systemConfig.columnIds[1], // 应用中心栏目id
+          states: 0,
+          orderBy: JSON.stringify([{ field: "create_time", orderByType: 2 }]),
+          pageSize: 9999,
+          page: 0,
+        };
+        appCenter.getDmsDataList(requestParams).then((res) => {
+          if (res.code === 200) {
+            this.itemApplications = res.content.data.map((item) => ({
+              ...item,
+              status:
+                item.status === 0
+                  ? "待审核"
+                  : item.status === 1
+                    ? "待发布"
+                    : item.status === 2
+                      ? "未完成"
+                      : "已完成",
+              buffName:
+                this.buffOptions.find((info) => info.label == item.appbuff.trim())?.value || "",
+              appstautName:
+                this.statusOptions.find((info) => info.label == item.appstauts.trim())?.value || "",
+              createTime: moment(item.create_time).format("YYYY-MM-DD HH:mm:ss"),
+            }));
+            this.applications = this.itemApplications;
+            // this.selectAapplications = this.applications.filter((item) => item.yylx == "0"); //yylx 0:内部 1:外部
+            this.newApplications = this.applications.slice(0, 10); // 获取前十个元素
+            // this.selectedAppRange = this.applications[0].title;
+            this.getTypeArrs();
+            this.getCountAppInfo();
+          } else {
+            this.applications = [];
+            this.selectAapplications = [];
+            this.selectedAppRange = "";
+          }
+        });
       });
-
     },
     getTypeArrs() {
       let that = this;