Browse Source

修改资料刷新sessionuser

lyn7568 6 years ago
parent
commit
c1dc203417

+ 8 - 7
src/router/index.js

@ -173,14 +173,14 @@ export const asyncRouterMap = [
173 173
      component: Layout,
174 174
      name: 'specialExperts',
175 175
      redirect: 'noredirect',
176
      alwaysShow: true,
176
      // alwaysShow: true,
177 177
      meta: { title: '特约专家' },
178 178
      children: [
179 179
        {
180 180
          path: 'expertslist',
181 181
          name: 'expertslist',
182 182
          component: () => import('@/views/specialExperts/index'),
183
          meta: { title: '特约专家列表' }
183
          meta: { title: '特约专家' }
184 184
        }
185 185
      ]
186 186
    },
@ -189,14 +189,14 @@ export const asyncRouterMap = [
189 189
      component: Layout,
190 190
      name: 'cooperationAgency',
191 191
      redirect: 'noredirect',
192
      alwaysShow: true,
192
      // alwaysShow: true,
193 193
      meta: { title: '合作机构' },
194 194
      children: [
195 195
        {
196 196
          path: 'agencylist',
197 197
          component: () => import('@/views/cooperationAgency/index'),
198 198
          name: 'agencylist',
199
          meta: { title: '合作机构管理列表' }
199
          meta: { title: '合作机构' }
200 200
        }
201 201
      ]
202 202
    },
@ -217,7 +217,7 @@ export const asyncRouterMap = [
217 217
            {
218 218
              path: 'noactiveList',
219 219
              name: 'noactiveList',
220
              meta: { title: '未激活企业列表' },
220
              meta: { title: '未激活企业' },
221 221
              component: () => import('@/views/companyCen/noactive/noactiveList')
222 222
            },
223 223
            {
@ -229,6 +229,7 @@ export const asyncRouterMap = [
229 229
            },
230 230
            {
231 231
              path: 'compProduct',
232
              hidden: true,
232 233
              component: () => import('@/views/companyCen/noactive/compProduct'),
233 234
              name: 'compProduct',
234 235
              meta: { title: '企业产品' }
@ -255,14 +256,14 @@ export const asyncRouterMap = [
255 256
      component: Layout,
256 257
      name: 'platinfo',
257 258
      redirect: 'noredirect',
258
      alwaysShow: true,
259
      // alwaysShow: true,
259 260
      meta: { title: '平台信息' },
260 261
      children: [
261 262
        {
262 263
          path: 'platUpdate',
263 264
          component: () => import('@/views/platInfo/platUpdate'),
264 265
          name: 'platUpdate',
265
          meta: { title: '修改平台信息' }
266
          meta: { title: '平台信息' }
266 267
        }
267 268
      ]
268 269
    },

+ 9 - 4
src/views/accountSettings/modifyAccountInformation.vue

@ -125,18 +125,23 @@
125 125
    },
126 126
    methods: {
127 127
      submitForm(formName) {
128
        this.$refs[formName].validate((valid) => {
128
        var that = this
129
        that.$refs[formName].validate((valid) => {
129 130
          if (valid) {
130
            this.$http.put(modifyUrl, this.ruleForm2, (response) => {
131
            that.$http.put(modifyUrl, that.ruleForm2, (response) => {
131 132
              if (response.success) {
132
                this.$message({
133
                that.$message({
133 134
                  message: '资料修改成功',
134 135
                  type: 'success'
135 136
                })
137
                that.$http.get('/ajax/sys/refresh', {}, function(data) {
138
                  if (data.success) {
139
                    that.$store.dispatch('GetUserInfo')
140
                  }
141
                })
136 142
              }
137 143
            })
138 144
          } else {
139
            console.log('error submit!!')
140 145
            return false
141 146
          }
142 147
        })

+ 3 - 4
src/views/companyCen/activeList.vue

@ -82,16 +82,16 @@ export default {
82 82
          width: '240'
83 83
        },
84 84
        {
85
          prop: 'job',
85
          prop: 'linkman',
86 86
          tit: '联系人'
87 87
        },
88 88
        {
89
          prop: 'linkPhone',
89
          prop: 'linkphone',
90 90
          tit: '联系电话',
91 91
          width: '120'
92 92
        },
93 93
        {
94
          prop: 'email',
94
          prop: 'linkemail',
95 95
          tit: '联系邮箱',
96 96
          width: '160'
97 97
        },
@ -141,7 +141,6 @@ export default {
141 141
            hData.num--
142 142
            that.total = res.data.total
143 143
            if (hData.num === 0) {
144
              console.log(obj)
145 144
              that.tableData = obj
146 145
            }
147 146
            comTable.gapFilling(that.tableData)

+ 19 - 33
src/views/demandCen/preview.vue

@ -30,7 +30,7 @@
30 30
          </el-col>
31 31
          <el-col :span="12">
32 32
            <el-form-item label="所在城市" prop="city">
33
              <span v-if="readonlyShow">{{ruleFormDem.cityStr}}</span>
33
              <span v-if="readonlyShow">{{cityStr}}</span>
34 34
              <cityPicker v-else @paren="toshow" @parenStr="toshowStr" :addrCode="ruleFormDem.city"></cityPicker>
35 35
            </el-form-item>
36 36
          </el-col>
@ -110,24 +110,6 @@
110 110
          </el-col>
111 111
        </el-row>
112 112
      </el-form>
113
      <div class="inner-wrapper">
114
        <!-- <el-collapse v-model="collapseName" v-if="buttCount>0">
115
          <el-collapse-item class="content-title" :title="`已为您对接${buttCount}位专家`" name="1">
116
            <div class="con-item" v-for="item in demandButtExperts" :key="item.index">
117
              <baseExpert :itemSingle="item.owner"></baseExpert>
118
              <div class="dele">
119
                <contactChat :cantactOptions="{oid: item.uid}"></contactChat>
120
                <collectCo :watchOptions="{oid: item.uid, type: 1}"></collectCo>
121
              </div>
122
              <div class="leavemsg">
123
                <div>留言:{{item.descp}}</div>
124
                <span>{{item.assTime}}</span>
125
              </div>
126
            </div>
127
          </el-collapse-item>
128
        </el-collapse>
129
        <div v-else class="content-title">正在为您对接专家...</div> -->
130
      </div>
131 113
    </div>
132 114
  </div>
133 115
</template>
@ -172,6 +154,7 @@
172 154
        demandCloseReason: '',
173 155
        ownerIn: {},
174 156
        feedback: '',
157
        cityStr: '',
175 158
        ruleFormDem: {
176 159
          title: '',
177 160
          descp: '',
@ -181,7 +164,6 @@
181 164
          linkOrg: '',
182 165
          cost: '',
183 166
          duration: '',
184
          cityStr: '',
185 167
          costStr: '',
186 168
          durationStr: ''
187 169
        },
@ -253,11 +235,6 @@
253 235
    methods: {
254 236
      getDictoryData() {
255 237
        const that = this
256
        queryDict.applyDict('XZQH', function(dictData) {
257
          dictData.map(item => {
258
            that.cityRange[item.code] = item.caption
259
          })
260
        }) // 城市
261 238
        queryDict.applyDict('FYYS', function(dictData) {
262 239
          dictData.map(item => {
263 240
            that.costRange.push({ value: item.code, label: item.caption })
@ -288,14 +265,23 @@
288 265
              })
289 266
              obj.durationStr = durationMM.label
290 267
            }
291
            if (obj.city) {
292
              obj.cityStr = that.cityRange[obj.city]
293
            }
294 268
            that.turnOutUserName(obj.creator)
269
            that.cityTurn(obj.city)
295 270
            that.formLoading = false
296 271
            that.ruleFormDem = obj
297 272
            if (obj.state === 2) {
298
              that.getFeedBack()
273
              that.getFeedBack(obj.creator)
274
            }
275
          }
276
        })
277
      },
278
      cityTurn(code) {
279
        const that = this
280
        queryDict.applyDict('XZQH', function(dictData) {
281
          for (let i = 0; i < dictData.length; ++i) {
282
            if (dictData[i].code === code) {
283
              that.cityStr = dictData[i].caption
284
              break
299 285
            }
300 286
          }
301 287
        })
@ -308,12 +294,12 @@
308 294
          }
309 295
        })
310 296
      },
311
      getFeedBack() {
297
      getFeedBack(id) {
312 298
        var that = this
313 299
        this.$http.get(feedbackReason, {
314 300
          target: that.demandId,
315 301
          type: 1,
316
          creator: that.ownerIn.id
302
          creator: id
317 303
        }, function(res) {
318 304
          if (res.success && res.data) {
319 305
            that.feedback = res.data.cnt
@ -353,7 +339,7 @@
353 339
              linkOrg: obj.linkOrg,
354 340
              cost: obj.cost,
355 341
              duration: obj.duration,
356
              cityStr: obj.cityStr,
342
              cityStr: that.cityStr,
357 343
              costStr: obj.costStr,
358 344
              durationStr: obj.durationStr
359 345
            }
@ -395,7 +381,7 @@
395 381
        this.ruleFormDem.city = value
396 382
      },
397 383
      toshowStr(value) {
398
        this.ruleFormDem.cityStr = value
384
        this.cityStr = value
399 385
      }
400 386
    }
401 387
  }

+ 18 - 22
src/views/userInfo/baseInfo.vue

@ -34,7 +34,7 @@
34 34
            <el-form-item label="联系邮箱">{{infoRow.email}}</el-form-item>
35 35
          </el-col>
36 36
          <el-col :span="24">
37
            <el-form-item label="所在城市">{{AllCitys[infoRow.addr]}}</el-form-item>
37
            <el-form-item label="所在城市">{{cityCaption}}</el-form-item>
38 38
          </el-col>
39 39
          <el-col :span="24" v-if="type">
40 40
            <el-form-item label="拉黑理由" class="el-to-block">
@ -52,8 +52,8 @@
52 52
        </el-col>
53 53
        <el-col :span="24">
54 54
          <el-form-item align="right">
55
            <span v-if='!type'>创建时间: {{createTime}}</span>
56
            <span v-else>拉黑时间: {{invalidTime}}</span>
55
            <span v-if='!type'>创建时间: {{infoRow.createTime ? parseTime(infoRow.createTime) : ''}}</span>
56
            <span v-else>拉黑时间: {{infoRow.invalidTime ? parseTime(infoRow.invalidTime) : ''}}</span>
57 57
          </el-form-item>
58 58
        </el-col>
59 59
      </el-row>
@ -64,15 +64,15 @@
64 64
<script>
65 65
  import { queryBlackOne } from '@/api/userInfo'
66 66
  import { defaultSet, parseTime } from '@/utils'
67
  import queryDict from '@/utils/queryDict'
68 67
  import queryBase from '@/utils/queryBase'
68
  import queryDict from '@/utils/queryDict'
69 69
  export default {
70 70
    props: ['type'],
71 71
    data() {
72 72
      return {
73 73
        userDialogVisible: false,
74
        AllCitys: [],
75
        infoRow: ''
74
        infoRow: '',
75
        parseTime: parseTime
76 76
      }
77 77
    },
78 78
    computed: {
@ -82,25 +82,21 @@
82 82
      headUrl() {
83 83
        return this.infoRow.head || defaultSet.img.user
84 84
      },
85
      createTime() {
86
        return this.infoRow.createTime ? parseTime(this.infoRow.createTime) : ''
87
      },
88
      invalidTime() {
89
        return this.infoRow.invalidTime ? parseTime(this.infoRow.invalidTime) : ''
90
      }
91
    },
92
    created() {
93
      this.getDictoryData()
94
    },
95
    methods: {
96
      getDictoryData() {
85
      cityCaption() {
97 86
        const that = this
87
        var city = ''
98 88
        queryDict.applyDict('XZQH', function(dictData) {
99
          dictData.map(item => {
100
            that.AllCitys[item.code] = item.fullCaption
101
          })
89
          for (let i = 0; i < dictData.length; ++i) {
90
            if (dictData[i].code === that.infoRow.addr) {
91
              city = dictData[i].fullCaption
92
              break
93
            }
94
          }
102 95
        })
103
      },
96
        return city
97
      }
98
    },
99
    methods: {
104 100
      queryNormalOne(id) {
105 101
        var that = this
106 102
        if (id) {

+ 1 - 0
src/views/userInfo/blackList.vue

@ -68,6 +68,7 @@ import pullBlack from './pullBlack'
68 68
export default {
69 69
  data() {
70 70
    return {
71
      AllCitys: [],
71 72
      blackType: true,
72 73
      searchText: '',
73 74
      pageSize: 10,

+ 2 - 9
src/views/userInfo/usingList.vue

@ -47,7 +47,7 @@
47 47
        </el-pagination>
48 48
      </div>
49 49
    </div>
50
    <baseInfo ref="baseInfo"></baseInfo>
50
    <baseInfo ref="baseInfoView"></baseInfo>
51 51
    <pullBlack ref="pullBlack"></pullBlack>
52 52
  </div>
53 53
</template>
@ -114,13 +114,6 @@ export default {
114 114
      ]
115 115
    }
116 116
  },
117
  watch: {
118
    '$route'(to, from) {
119
      console.log(111)
120
      console.log(to)
121
      console.log(from)
122
    }
123
  },
124 117
  components: {
125 118
    baseInfo,
126 119
    pullBlack
@ -161,7 +154,7 @@ export default {
161 154
      })
162 155
    },
163 156
    queryInfo(id) {
164
      this.$refs.baseInfo.queryNormalOne(id)
157
      this.$refs.baseInfoView.queryNormalOne(id)
165 158
    },
166 159
    pullBlackFun(id) {
167 160
      this.$refs.pullBlack.queryNormalOne(id)