wangfei пре 6 година
родитељ
комит
a2f794b5c1

+ 15
- 5
src/pages/system/caseManager/caseInfo/pplConcerned/editPPLConcerned/index.vue Прегледај датотеку

@@ -8,9 +8,9 @@
8 8
             <el-select v-model="postData.UserType" placeholder="请选择">
9 9
               <el-option
10 10
                 v-for="item in typeList"
11
-                :key="item.TypeId"
11
+                :key="item.TypeCode"
12 12
                 :label="item.TypeName"
13
-                :value="item.TypeId">
13
+                :value="item.TypeCode">
14 14
               </el-option>
15 15
             </el-select>
16 16
           </div>
@@ -22,6 +22,7 @@
22 22
               <el-input
23 23
                 placeholder="请输入名称"
24 24
                 v-model="postData.UserName"
25
+                maxlength="10"
25 26
                 clearable>
26 27
               </el-input>
27 28
             </div>
@@ -34,6 +35,7 @@
34 35
               <el-input
35 36
                 placeholder="请输入手机号码"
36 37
                 v-model="postData.Tel"
38
+                maxlength="11"
37 39
                 clearable>
38 40
               </el-input>
39 41
             </div>
@@ -98,11 +100,11 @@ export default {
98 100
       }
99 101
     },
100 102
     getUserTypeList () { // 获取用户类型
101
-      this.$ajax(this.$api.caseManager.getUserTypeList.url, {
102
-        method: this.$api.caseManager.getUserTypeList.method,
103
+      this.$ajax(this.$api.caseManager.getCaseUserType.url, {
104
+        method: this.$api.caseManager.getCaseUserType.method,
103 105
       }).then(res => {
104 106
         this.typeList = res
105
-        this.postData.UserType = res[0].TypeId
107
+        this.postData.UserType = res[0].TypeCode
106 108
       })
107 109
     },
108 110
     submit () { // 提交数据
@@ -120,6 +122,14 @@ export default {
120 122
         })
121 123
         return false
122 124
       }
125
+      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
126
+      if (!myreg.test(this.postData.Tel)) {
127
+        this.$message({
128
+          type: 'error',
129
+          message: '请输入正确的手机号!'
130
+        })
131
+        return false
132
+      }
123 133
       this.postData.OrgId = this.OrgId
124 134
       if (this.$route.query.userid !== undefined) {
125 135
         this.$ajax(this.$api.caseManager.editCaseUser.url, {

+ 8
- 6
src/pages/system/caseManager/caseInfo/pplConcerned/index.vue Прегледај датотеку

@@ -14,8 +14,10 @@
14 14
         stripe
15 15
         style="width: 100%">
16 16
         <el-table-column
17
-          prop="UserType"
18 17
           label="用户类型">
18
+          <template slot-scope="scope">
19
+            {{getUserType(scope.row)}}
20
+          </template>
19 21
         </el-table-column>
20 22
         <el-table-column
21 23
           prop="UserName"
@@ -67,10 +69,13 @@ export default {
67 69
     })
68 70
   },
69 71
   methods: {
72
+    getUserType (row) {
73
+      return (this.typeList.filter(x => x.TypeCode === row.UserType)[0] || {}).TypeName || ''
74
+    },
70 75
     getUserTypeList () { // 获取用户类型
71 76
       return new Promise((resolve) => {
72
-        this.$ajax(this.$api.caseManager.getUserTypeList.url, {
73
-          method: this.$api.caseManager.getUserTypeList.method,
77
+        this.$ajax(this.$api.caseManager.getCaseUserType.url, {
78
+          method: this.$api.caseManager.getCaseUserType.method,
74 79
         }).then(res => {
75 80
           this.typeList = res
76 81
           resolve()
@@ -85,9 +90,6 @@ export default {
85 90
         method: this.$api.caseManager.getCaseUserList.method,
86 91
         queryData: this.postData
87 92
       }).then(res => {
88
-        for (var n = 0; n < res.list.length; n++) {
89
-          res.list[n].UserType = this.typeList.filter(x => x.TypeId === res.list[n].UserType)[0].TypeName
90
-        }
91 93
         this.currentList = res.list
92 94
         this.postData.page = res.page
93 95
         this.total = res.pagenum

+ 6
- 2
src/pages/system/cmsManager/majorProjects/index.vue Прегледај датотеку

@@ -9,6 +9,10 @@
9 9
           <li>
10 10
             <span>选择案场:</span>
11 11
             <el-select v-model="tableSearch.caseId" placeholder="请选择">
12
+              <el-option
13
+              value=""
14
+              >
15
+              </el-option>
12 16
               <el-option
13 17
                 v-for="item in caseList"
14 18
                 :key="item.CaseId"
@@ -108,14 +112,14 @@ export default {
108 112
   },
109 113
   created () {
110 114
     this.updateSystemInfo().then(() => {
111
-      this.tableSearch.caseId = this.defaultCaseId
115
+      // this.tableSearch.caseId = this.defaultCaseId
112 116
       this.getList()
113 117
     })
114 118
   },
115 119
   methods: {
116 120
     ...mapActions(['updateSystemInfo']),
117 121
     handleCurrentChange (val) {
118
-      this.postData.currentPage = val - 1
122
+      this.postData.currentPage = val
119 123
       this.getList()
120 124
     },
121 125
     showItem (index, row) { // 前台显示

+ 2
- 1
src/pages/system/cmsManager/newsManager/index.vue Прегледај датотеку

@@ -18,7 +18,7 @@
18 18
             </el-select>
19 19
           </li>
20 20
         </ul>
21
-        <tableSearch @exportSearchKey="searchList"></tableSearch>
21
+        <tableSearch @exportSearchKey="searchList" value="请输入标题"></tableSearch>
22 22
       </div>
23 23
       <div class="moreFilter"></div>
24 24
     </div>
@@ -109,6 +109,7 @@ export default {
109 109
     ...mapCmsActions(['updateLocationInfo']),
110 110
     handleCurrentChange (val) {
111 111
       console.log(`当前页: ${val}`)
112
+      this.getList()
112 113
     },
113 114
     handleEdit (index, row) { // 编辑
114 115
       console.log(index, row)

+ 4
- 0
src/util/api.js Прегледај датотеку

@@ -100,6 +100,10 @@ const $api = {
100 100
       method: 'put',
101 101
       url: `${baseUrl}${common}/case/info/:id`
102 102
     },
103
+    getCaseUserType: { // 获取案场相关人员类型
104
+      method: 'get',
105
+      url: `${baseUrl}${common}/case/usertype`
106
+    },
103 107
     getCaseUserList: { // 获取案场相关人员列表
104 108
       method: 'get',
105 109
       url: `${baseUrl}${common}/case/user`