Browse Source

bug修改

wangfei 6 years ago
parent
commit
a2f794b5c1

+ 15
- 5
src/pages/system/caseManager/caseInfo/pplConcerned/editPPLConcerned/index.vue View File

8
             <el-select v-model="postData.UserType" placeholder="请选择">
8
             <el-select v-model="postData.UserType" placeholder="请选择">
9
               <el-option
9
               <el-option
10
                 v-for="item in typeList"
10
                 v-for="item in typeList"
11
-                :key="item.TypeId"
11
+                :key="item.TypeCode"
12
                 :label="item.TypeName"
12
                 :label="item.TypeName"
13
-                :value="item.TypeId">
13
+                :value="item.TypeCode">
14
               </el-option>
14
               </el-option>
15
             </el-select>
15
             </el-select>
16
           </div>
16
           </div>
22
               <el-input
22
               <el-input
23
                 placeholder="请输入名称"
23
                 placeholder="请输入名称"
24
                 v-model="postData.UserName"
24
                 v-model="postData.UserName"
25
+                maxlength="10"
25
                 clearable>
26
                 clearable>
26
               </el-input>
27
               </el-input>
27
             </div>
28
             </div>
34
               <el-input
35
               <el-input
35
                 placeholder="请输入手机号码"
36
                 placeholder="请输入手机号码"
36
                 v-model="postData.Tel"
37
                 v-model="postData.Tel"
38
+                maxlength="11"
37
                 clearable>
39
                 clearable>
38
               </el-input>
40
               </el-input>
39
             </div>
41
             </div>
98
       }
100
       }
99
     },
101
     },
100
     getUserTypeList () { // 获取用户类型
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
       }).then(res => {
105
       }).then(res => {
104
         this.typeList = res
106
         this.typeList = res
105
-        this.postData.UserType = res[0].TypeId
107
+        this.postData.UserType = res[0].TypeCode
106
       })
108
       })
107
     },
109
     },
108
     submit () { // 提交数据
110
     submit () { // 提交数据
120
         })
122
         })
121
         return false
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
       this.postData.OrgId = this.OrgId
133
       this.postData.OrgId = this.OrgId
124
       if (this.$route.query.userid !== undefined) {
134
       if (this.$route.query.userid !== undefined) {
125
         this.$ajax(this.$api.caseManager.editCaseUser.url, {
135
         this.$ajax(this.$api.caseManager.editCaseUser.url, {

+ 8
- 6
src/pages/system/caseManager/caseInfo/pplConcerned/index.vue View File

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

+ 6
- 2
src/pages/system/cmsManager/majorProjects/index.vue View File

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

+ 2
- 1
src/pages/system/cmsManager/newsManager/index.vue View File

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

+ 4
- 0
src/util/api.js View File

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