luyanan 6 years ago
parent
commit
50b0e506c4
43 changed files with 3115 additions and 558 deletions
  1. 0 81
      src/api/bridge.js
  2. 0 73
      src/api/collectionbox.js
  3. 0 73
      src/api/sensor.js
  4. 0 73
      src/api/server.js
  5. 18 0
      src/api/sysSetting.js
  6. 0 82
      src/api/userManagemen.js
  7. 1 1
      src/components/Breadcrumb/index.vue
  8. 41 7
      src/components/CityPicker/index.vue
  9. 205 0
      src/components/DynamicTags/index.vue
  10. 1 1
      src/components/complexTable/index.vue
  11. 123 1
      src/router/index.js
  12. 13 1
      src/styles/element-ui.scss
  13. 7 5
      src/styles/index.scss
  14. 48 1
      src/styles/sidebar.scss
  15. 3 3
      src/styles/variables.scss
  16. 20 0
      src/utils/comTable.js
  17. 7 7
      src/utils/index.js
  18. 3 3
      src/utils/queryDict.js
  19. 13 3
      src/utils/request.js
  20. 0 78
      src/utils/timingConstruct.js
  21. 61 0
      src/utils/validator.js
  22. 89 0
      src/views/companyCen/activeList.vue
  23. 5 0
      src/views/companyCen/noactive/compHome.vue
  24. 452 0
      src/views/companyCen/noactive/compInfo.vue
  25. 132 0
      src/views/companyCen/noactive/compProduct.vue
  26. 6 0
      src/views/companyCen/noactive/index.vue
  27. 95 0
      src/views/companyCen/noactive/noactiveList.vue
  28. 5 0
      src/views/companyCen/noactive/productHome.vue
  29. 304 0
      src/views/companyCen/noactive/productInfo.vue
  30. 5 14
      src/views/layout/Layout.vue
  31. 3 3
      src/views/layout/components/AppMain.vue
  32. 11 2
      src/views/layout/components/Navbar.vue
  33. 7 1
      src/views/layout/components/Sidebar/SidebarItem.vue
  34. 1 1
      src/views/layout/components/Sidebar/index.vue
  35. 1 44
      src/views/layout/components/TopNavbar.vue
  36. 289 0
      src/views/platInfo/platUpdate.vue
  37. 323 0
      src/views/sysSetting/DemandIssue.vue
  38. 226 0
      src/views/sysSetting/adminUser.vue
  39. 208 0
      src/views/sysSetting/editUser.vue
  40. 86 0
      src/views/userInfo/baseInfo.vue
  41. 89 0
      src/views/userInfo/blackList.vue
  42. 111 0
      src/views/userInfo/pullBlack.vue
  43. 103 0
      src/views/userInfo/usingList.vue

+ 0 - 81
src/api/bridge.js

@ -1,81 +0,0 @@
1
import request from '@/utils/request'
2
3
/*  添加桥梁 */
4
export function addDevice(params) {
5
  return request({
6
    url: '/ajax/bridge',
7
    method: 'post',
8
    data: params
9
  })
10
}
11
12
/*  更新桥梁信息 */
13
export function updateDevice(params) {
14
  return request({
15
    url: '/ajax/bridge/update',
16
    method: 'post',
17
    data: params
18
  })
19
}
20
21
/*  删除桥梁信息 */
22
export function deleteDevice(params) {
23
  return request({
24
    url: '/ajax/bridge/delete',
25
    method: 'get',
26
    params
27
  })
28
}
29
30
/*  查询单个桥梁 */
31
export function queryDevice(params) {
32
  return request({
33
    url: '/ajax/bridge/qo',
34
    method: 'get',
35
    params
36
  })
37
}
38
39
/*  分页查询桥梁 */
40
export function pageQueryDevice(params) {
41
  return request({
42
    url: '/ajax/bridge/pq',
43
    method: 'get',
44
    params
45
  })
46
}
47
48
/*  校验桥梁编号 */
49
export function checkDeviceCode(params) {
50
  return request({
51
    url: '/ajax/bridge/checkCode',
52
    method: 'get',
53
    params
54
  })
55
}
56
57
/*  校验桥梁简称 */
58
export function checkBridgeShortName(params) {
59
  return request({
60
    url: '/ajax/bridge/checkShortName',
61
    method: 'get',
62
    params
63
  })
64
}
65
66
/*  校验桥梁全称 */
67
export function checkBridgeName(params) {
68
  return request({
69
    url: '/ajax/bridge/checkName',
70
    method: 'get',
71
    params
72
  })
73
}
74
75
/*  上传图片 */
76
export function uploadBridgeImg() {
77
  return request({
78
    url: '/ajax/bridge/upload',
79
    method: 'post'
80
  })
81
}

+ 0 - 73
src/api/collectionbox.js

@ -1,73 +0,0 @@
1
import request from '@/utils/request'
2
3
/*  添加采集盒 */
4
export function addDevice(params) {
5
  return request({
6
    url: '/ajax/device',
7
    method: 'post',
8
    data: params
9
  })
10
}
11
12
/*  更新采集盒信息 */
13
export function updateDevice(params) {
14
  return request({
15
    url: '/ajax/device/update',
16
    method: 'post',
17
    data: params
18
  })
19
}
20
21
/*  删除采集盒信息 */
22
export function deleteDevice(params) {
23
  return request({
24
    url: '/ajax/device/delete',
25
    method: 'get',
26
    params
27
  })
28
}
29
30
/*  查询单个采集盒 */
31
export function queryDevice(params) {
32
  return request({
33
    url: '/ajax/device/qo',
34
    method: 'get',
35
    params
36
  })
37
}
38
39
/*  分页查询采集盒 */
40
export function pageQueryDevice(params) {
41
  return request({
42
    url: '/ajax/device/pq',
43
    method: 'get',
44
    params
45
  })
46
}
47
48
/*  采集盒所属服务器编号列表 */
49
export function DeviceOfservice(params) {
50
  return request({
51
    url: '/ajax/server/listByCode',
52
    method: 'get',
53
    params
54
  })
55
}
56
57
/*  校验采集盒编号 */
58
export function checkDeviceCode(params) {
59
  return request({
60
    url: '/ajax/device/checkCode',
61
    method: 'get',
62
    params
63
  })
64
}
65
66
/*  校验采集盒内部编号 */
67
export function checkDeviceInternalCode(params) {
68
  return request({
69
    url: '/ajax/device/checkSeq',
70
    method: 'get',
71
    params
72
  })
73
}

+ 0 - 73
src/api/sensor.js

@ -1,73 +0,0 @@
1
import request from '@/utils/request'
2
3
/*  添加传感器 */
4
export function addDevice(params) {
5
  return request({
6
    url: '/ajax/transducer',
7
    method: 'post',
8
    data: params
9
  })
10
}
11
12
/*  更新传感器信息 */
13
export function updateDevice(params) {
14
  return request({
15
    url: '/ajax/transducer/update',
16
    method: 'post',
17
    data: params
18
  })
19
}
20
21
/*  删除传感器信息 */
22
export function deleteDevice(params) {
23
  return request({
24
    url: '/ajax/transducer/delete',
25
    method: 'get',
26
    params
27
  })
28
}
29
30
/*  查询单个传感器 */
31
export function queryDevice(params) {
32
  return request({
33
    url: '/ajax/transducer/qo',
34
    method: 'get',
35
    params
36
  })
37
}
38
39
/*  分页查询传感器 */
40
export function pageQueryDevice(params) {
41
  return request({
42
    url: '/ajax/transducer/pq',
43
    method: 'get',
44
    params
45
  })
46
}
47
48
/*  传感器所属采集盒编号列表 */
49
export function DeviceOfservice(params) {
50
  return request({
51
    url: '/ajax/device/listByCode',
52
    method: 'get',
53
    params
54
  })
55
}
56
57
/*  校验传感器编号 */
58
export function checkDeviceCode(params) {
59
  return request({
60
    url: '/ajax/transducer/checkCode',
61
    method: 'get',
62
    params
63
  })
64
}
65
66
/*  校验传感器内部编号 */
67
export function checkDeviceInternalCode(params) {
68
  return request({
69
    url: '/ajax/transducer/checkSeq',
70
    method: 'get',
71
    params
72
  })
73
}

+ 0 - 73
src/api/server.js

@ -1,73 +0,0 @@
1
import request from '@/utils/request'
2
3
/*  添加服务器 */
4
export function addDevice(params) {
5
  return request({
6
    url: '/ajax/server',
7
    method: 'post',
8
    data: params
9
  })
10
}
11
12
/*  更新服务器信息 */
13
export function updateDevice(params) {
14
  return request({
15
    url: '/ajax/server/update',
16
    method: 'post',
17
    data: params
18
  })
19
}
20
21
/*  删除服务器信息 */
22
export function deleteDevice(params) {
23
  return request({
24
    url: '/ajax/server/delete',
25
    method: 'get',
26
    params
27
  })
28
}
29
30
/*  查询单个服务器 */
31
export function queryDevice(params) {
32
  return request({
33
    url: '/ajax/server/qo',
34
    method: 'get',
35
    params
36
  })
37
}
38
39
/*  分页查询服务器 */
40
export function pageQueryDevice(params) {
41
  return request({
42
    url: '/ajax/server/pq',
43
    method: 'get',
44
    params
45
  })
46
}
47
48
/*  服务器所属采桥梁列表 */
49
export function DeviceOfservice(params) {
50
  return request({
51
    url: '/ajax/bridge/list',
52
    method: 'get',
53
    params
54
  })
55
}
56
57
/*  校验服务器编号 */
58
export function checkDeviceCode(params) {
59
  return request({
60
    url: '/ajax/server/checkCode',
61
    method: 'get',
62
    params
63
  })
64
}
65
66
/*  校验服务器内部编号 */
67
export function checkDeviceInternalCode(params) {
68
  return request({
69
    url: '/ajax/server/checkSeq',
70
    method: 'get',
71
    params
72
  })
73
}

+ 18 - 0
src/api/sysSetting.js

@ -0,0 +1,18 @@
1
/*  分页查询用户 */
2
export const pageQueryUser = '/ajax/sys/pq'
3
/*  查看用户信息 */
4
export const queryUserOne = '/ajax/sys/qo'
5
6
/*  检查账号是否注册 */
7
export const checkRegister = '/ajax/sys/check'
8
9
/*  新增用户 */
10
export const addUser = '/ajax/sys/new'
11
/*  修改用户信息 */
12
export const updateUser = '/ajax/sys/renew'
13
/*  修改用户权限 */
14
export const updatePermission = '/ajax/sys/right/'
15
/*  重置密码 */
16
export const resetPw = '/ajax/sys/resetpw'
17
/*  停用用户 */
18
export const banUser = '/ajax/sys/ban'

+ 0 - 82
src/api/userManagemen.js

@ -1,82 +0,0 @@
1
import request from '@/utils/request'
2
3
/*  停用用户 */
4
export function deleteUser(params) {
5
  return request({
6
    url: '/ajax/sys/ban',
7
    method: 'get',
8
    params
9
  })
10
}
11
12
/*  查询负责桥梁 */
13
export function queryResponsibleBridge(params) {
14
  return request({
15
    url: '/ajax/bridge/byUserId',
16
    method: 'get',
17
    params
18
  })
19
}
20
21
/*  分页查询用户 */
22
export function pageQueryUser(params) {
23
  return request({
24
    url: '/ajax/sys/pq',
25
    method: 'get',
26
    params
27
  })
28
}
29
30
/*  检查账号是否注册 */
31
export function checkRegister(params) {
32
  return request({
33
    url: '/ajax/sys/check',
34
    method: 'get',
35
    params
36
  })
37
}
38
39
/*  新增新用户 */
40
export function addRegister(params) {
41
  return request({
42
    url: '/ajax/sys/insert',
43
    method: 'post',
44
    data: params
45
  })
46
}
47
48
/*  更新新用户 */
49
export function updateRegister(params) {
50
  return request({
51
    url: '/ajax/sys/update',
52
    method: 'post',
53
    data: params
54
  })
55
}
56
57
/*  查找用户信息 */
58
export function queryRegister(params) {
59
  return request({
60
    url: '/ajax/sys/qo',
61
    method: 'get',
62
    params
63
  })
64
}
65
66
/*  传感器所属采集盒编号列表 */
67
export function DeviceOfservice(params) {
68
  return request({
69
    url: '/ajax/bridge/list',
70
    method: 'get',
71
    params
72
  })
73
}
74
75
/*  更新用户权限 */
76
export function updatePermission(params) {
77
  return request({
78
    url: '/ajax/sys/userBridge/refresh',
79
    method: 'post',
80
    data: params
81
  })
82
}

+ 1 - 1
src/components/Breadcrumb/index.vue

@ -1,5 +1,5 @@
1 1
<template>
2
  <el-breadcrumb class="app-breadcrumb" separator="/">
2
  <el-breadcrumb class="app-breadcrumb" separator=">">
3 3
    <transition-group name="breadcrumb">
4 4
      <el-breadcrumb-item v-for="(item,index)  in levelList" :key="item.path" v-if="item.meta.title">
5 5
        <span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{item.meta.title}}</span>

+ 41 - 7
src/components/CityPicker/index.vue

@ -1,11 +1,42 @@
1 1
<template>
2 2
  <div class="linkage">
3
    <el-row :gutter="10">
4
      <el-col :span="8">
3
    <!-- <el-col :span="24" class="cityParent">
4
      <el-form-item label="所在城市" prop="province">
5
        <el-col :span="24">
6
          <el-select :style="{width: widthselect + 'px'}"
7
           v-model="selectProv"
8
           placeholder="请选择所在省/直辖市"
9
           v-on:change="getProv($event)">
10
            <el-option
11
              v-for="item in provs"
12
              :label="item.text"
13
              :value="item.text"
14
              :key="item.index">
15
            </el-option>
16
          </el-select>
17
        </el-col>
18
      </el-form-item>
19
      <el-form-item prop="city" class="cityChild"
20
        :style="{left: labelW ? (widthselect + labelW + 6 + 'px'):(widthselect + 6 + 'px')}">
21
        <el-select :style="{width: widthselect + 'px', marginLeft: labelW ? (-labelW +'px'): 0}"
22
           v-model="selectCity"
23
           placeholder="请选择所在城市"
24
           v-on:change="getCity($event)">
25
          <el-option
26
            v-for="item in citys"
27
            :label="item.text"
28
            :value="item.text"
29
            :key="item.index">
30
          </el-option>
31
        </el-select>
32
      </el-form-item>
33
    </el-col> -->
34
    <el-row>
35
      <el-col :span="12">
5 36
        <el-select
6 37
          v-model="sheng"
7 38
          @change="choseProvince"
8
          placeholder="省">
39
          placeholder="省/直辖市">
9 40
          <el-option
10 41
            v-for="item in province"
11 42
            :key="item.id"
@ -14,11 +45,11 @@
14 45
          </el-option>
15 46
        </el-select>
16 47
      </el-col>
17
      <el-col :span="8">
48
      <el-col :span="12">
18 49
        <el-select
19 50
          v-model="shi"
20 51
          @change="choseCity"
21
          placeholder="市">
52
          placeholder="所在城市">
22 53
          <el-option
23 54
            v-for="item in shi1"
24 55
            :key="item.id"
@ -27,7 +58,7 @@
27 58
          </el-option>
28 59
        </el-select>
29 60
      </el-col>
30
      <el-col :span="8">
61
      <!-- <el-col :span="8">
31 62
        <el-select
32 63
          v-model="qu"
33 64
          @change="choseBlock"
@ -39,7 +70,7 @@
39 70
            :value="item.id">
40 71
          </el-option>
41 72
        </el-select>
42
      </el-col>
73
      </el-col> -->
43 74
    </el-row>
44 75
  </div>
45 76
</template>
@ -140,3 +171,6 @@ export default {
140 171
  }
141 172
}
142 173
</script>
174
<style rel="stylesheet/scss" lang="scss" scoped>
175
176
</style>

+ 205 - 0
src/components/DynamicTags/index.vue

@ -0,0 +1,205 @@
1
<template>
2
  <div class="tag-box">
3
    <div class="tag-btn" v-if="isShowAdd">
4
      <el-input
5
        class="input-new-tag"
6
        v-if="inputVisible"
7
        v-model="inputValue"
8
        ref="saveTagInput"
9
        size="medium"
10
        @keyup.enter.native="handleInputConfirm"
11
        @blur="handleInputConfirm"
12
      >
13
      </el-input>
14
      <!-- <el-autocomplete
15
        class="input-new-tag"
16
        v-if="inputVisible"
17
        v-model="inputValue"
18
        ref="saveTagInput"
19
        size="medium"
20
        :placeholder="tagInfo.placeholder"
21
        :trigger-on-focus="false"
22
        @select="handleSelect"
23
        :fetch-suggestions="querySearch"
24
        @keyup.enter.native="handleInputConfirm"
25
        @blur="handleInputConfirm"
26
      >
27
        <template slot-scope="{ item }">
28
          <div class="name">{{ item.caption }}</div>
29
        </template>
30
      </el-autocomplete> -->
31
      <el-button v-else class="button-new-tag" size="medium" @click="showInput">+ {{tagInfo.placeholder}}</el-button>
32
    </div>
33
    <div class="tag-show" :class="tagInfo.tagblock ? 'tag-block' : ''">
34
      <div class="tag-item" :key="tag" v-for="tag in dynamicTags">
35
        <el-tag
36
          closable
37
          :disable-transitions="false"
38
          @close="handleClose(tag)">
39
          {{tag}}
40
        </el-tag>
41
      </div>
42
    </div>
43
  </div>
44
45
</template>
46
47
<script>
48
  // import httpUrl from '@/libs/http'
49
  import { trimStr } from '@/utils'
50
  export default {
51
    props: {
52
      tagInfo: {
53
        type: Object
54
      },
55
      dyStr: {
56
        type: String
57
      }
58
    },
59
    data() {
60
      return {
61
        inputVisible: false,
62
        inputValue: '',
63
        dynamicTags: [],
64
        isShowAdd: true,
65
        restaurants: [],
66
        loadAllKeys: []
67
      }
68
    },
69
    watch: {
70
      dyStr() {
71
        if (this.dyStr) {
72
          this.dynamicTags = this.dyStr.split(',')
73
          if (this.dynamicTags.length < this.tagInfo.tagsNum) {
74
            this.isShowAdd = true
75
          } else {
76
            this.isShowAdd = false
77
          }
78
        }
79
      }
80
    },
81
    methods: {
82
      // add tag
83
      handleClose(tag) {
84
        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
85
        this.$emit('turnTags', this.dynamicTags.join(',')) // 传给父组件
86
        if (this.dynamicTags.length < this.tagInfo.tagsNum) {
87
          this.isShowAdd = true
88
        } else {
89
          this.isShowAdd = false
90
        }
91
      },
92
      showInput() {
93
        this.inputVisible = true
94
        this.$nextTick(_ => {
95
          this.$refs.saveTagInput.$refs.input.focus()
96
        })
97
      },
98
      handleInputConfirm() {
99
        const inputValue = this.inputValue
100
        if (trimStr(inputValue)) {
101
          if (inputValue.length > this.tagInfo.limitCount) {
102
            this.$alert(`${this.tagInfo.lableTit}不得超过${this.tagInfo.limitCount}个字,添加失败!`, '提示', {
103
              confirmButtonText: '确定',
104
              type: 'warning',
105
              center: true
106
            })
107
            return false
108
          }
109
          for (var i = 0; i < this.dynamicTags.length; i++) {
110
            if (inputValue === this.dynamicTags[i]) {
111
              this.$alert('添加的内容不能重复', '提示', {
112
                confirmButtonText: '确定',
113
                type: 'warning',
114
                center: true
115
              })
116
              this.inputValue = ''
117
              return false
118
            }
119
          }
120
121
          this.dynamicTags.push(inputValue)
122
123
          if (this.dynamicTags.length < this.tagInfo.tagsNum) {
124
            this.isShowAdd = true
125
          } else {
126
            this.isShowAdd = false
127
          }
128
        }
129
130
        this.$emit('turnTags', this.dynamicTags.join(',')) // 传给父组件
131
        this.inputVisible = false
132
        this.inputValue = ''
133
      }
134
      // add tag
135
136
      // select key tag
137
      // querySearch(queryString, cb) {
138
      //   this.$axios.get(httpUrl.kxQurey.qaHotKey, {
139
      //     key: queryString
140
      //   }, (res) => {
141
      //     if (res.success) {
142
      //       var $info = res.data;
143
      //       var oSr = [];
144
      //       for (let i = 0; i < Math.min($info.length, 5); i++) {
145
      //         oSr[i] = $info[i];
146
      //       };
147
      //       this.loadAllKeys = oSr;
148
      //       // if (this.loadAllKeys.length === 0) {
149
      //       //   this.loadAllKeys = [{caption: '暂无数据'}]
150
      //       // };
151
      //       cb(this.loadAllKeys);
152
      //     };
153
      //   });
154
      // },
155
      // handleSelect(item) {
156
      //   this.inputValue = item.caption
157
      // }
158
    }
159
  }
160
</script>
161
162
<style rel="stylesheet/scss" lang="scss" scoped>
163
  .tag-show {
164
    overflow: hidden;
165
    padding:5px 0 0;
166
    margin-bottom:-5px;
167
    .tag-item{
168
      float:left;
169
      .el-tag {
170
        margin-right:10px;
171
        margin-bottom:5px;
172
        min-height: 32px;
173
        padding: 6px 10px;
174
        line-height: 20px;
175
        height:auto;
176
      }
177
    }
178
  }
179
  .tag-block{
180
    .tag-item{
181
      float:none;
182
      display: block;
183
      .el-tag {
184
        margin-left: 0;
185
        white-space: normal;
186
      }
187
    }
188
  }
189
  .button-new-tag{
190
    width:100%;
191
    height: 38px;
192
    line-height: 36px;
193
    padding-top: 0;
194
    text-align: left;
195
    padding-bottom: 0;
196
    color: #c0c4cc;
197
    overflow:hidden;
198
  }
199
  .el-input.input-new-tag{
200
    width: 100%;
201
    vertical-align: bottom;
202
    margin-left: 0;
203
    overflow:hidden;
204
  }
205
</style>

+ 1 - 1
src/components/complexTable/index.vue

@ -2,7 +2,7 @@
2 2
  <div>
3 3
    <el-table
4 4
      :data="tableData"
5
      height="600"
5
      height="630"
6 6
      border>
7 7
      <el-table-column v-if="hasSelect"
8 8
        type="selection"

+ 123 - 1
src/router/index.js

@ -99,6 +99,129 @@ export const constantRouterMap = [
99 99
        meta: { title: '已关闭需求' }
100 100
      }
101 101
    ]
102
  },
103
  {
104
    path: '',
105
    component: Layout,
106
    name: 'company',
107
    redirect: 'noredirect',
108
    meta: { title: '企业中心' },
109
    children: [
110
      {
111
        path: 'noactive',
112
        component: () => import('@/views/companyCen/noactive/index'),
113
        name: 'noactive',
114
        parentPath: true,
115
        redirect: { name: 'noactiveList' },
116
        meta: { title: '未激活企业' },
117
        children: [
118
          {
119
            path: 'noactiveList',
120
            name: 'noactiveList',
121
            hidden: true,
122
            component: () => import('@/views/companyCen/noactive/noactiveList')
123
          },
124
          {
125
            path: 'compHome',
126
            component: () => import('@/views/companyCen/noactive/compHome'),
127
            name: 'compHome',
128
            parentPath: true,
129
            redirect: { name: 'compInfo' },
130
            meta: { title: '企业信息' },
131
            children: [
132
              {
133
                path: 'compInfo',
134
                name: 'compInfo',
135
                hidden: true,
136
                component: () => import('@/views/companyCen/noactive/compInfo')
137
              },
138
              {
139
                path: 'productHome',
140
                component: () => import('@/views/companyCen/noactive/productHome'),
141
                name: 'productHome',
142
                parentPath: true,
143
                redirect: { name: 'compProduct' },
144
                children: [
145
                  {
146
                    path: 'compProduct',
147
                    component: () => import('@/views/companyCen/noactive/compProduct'),
148
                    name: 'compProduct',
149
                    meta: { title: '企业产品' }
150
                  },
151
                  {
152
                    path: 'productInfo',
153
                    component: () => import('@/views/companyCen/noactive/productInfo'),
154
                    name: 'productInfo',
155
                    hidden: true,
156
                    meta: { title: '产品详情' }
157
                  }
158
                ]
159
              }
160
            ]
161
          }
162
        ]
163
      },
164
      {
165
        path: 'activeList',
166
        component: () => import('@/views/companyCen/activeList'),
167
        name: 'activeList',
168
        meta: { title: '已激活企业' }
169
      }
170
    ]
171
  },
172
  {
173
    path: '',
174
    component: Layout,
175
    name: 'platinfo',
176
    redirect: 'noredirect',
177
    alwaysShow: true,
178
    meta: { title: '平台信息' },
179
    children: [
180
      {
181
        path: 'platUpdate',
182
        component: () => import('@/views/platInfo/platUpdate'),
183
        name: 'platUpdate',
184
        meta: { title: '修改平台信息' }
185
      }
186
    ]
187
  },
188
  {
189
    path: '',
190
    component: Layout,
191
    name: 'userinfo',
192
    redirect: 'noredirect',
193
    alwaysShow: true,
194
    meta: { title: '用户信息' },
195
    children: [
196
      {
197
        path: 'usingList',
198
        component: () => import('@/views/userInfo/usingList'),
199
        name: 'usingList',
200
        meta: { title: '正常用户' }
201
      },
202
      {
203
        path: 'blackList',
204
        component: () => import('@/views/userInfo/blackList'),
205
        name: 'blackList',
206
        meta: { title: '黑名单用户' }
207
      }
208
    ]
209
  },
210
  {
211
    path: '',
212
    component: Layout,
213
    name: 'sysSetting',
214
    redirect: 'noredirect',
215
    alwaysShow: true,
216
    meta: { title: '系统设置' },
217
    children: [
218
      {
219
        path: 'adminUser',
220
        component: () => import('@/views/sysSetting/adminUser'),
221
        name: 'adminUser',
222
        meta: { title: '平台后台用户管理列表' }
223
      }
224
    ]
102 225
  }
103 226
]
104 227
@ -114,6 +237,5 @@ export default new Router({
114 237
// 动态需要根据权限加载的路由表
115 238
116 239
export const asyncRouterMap = [
117
  
118 240
  { path: '*', redirect: '/404', hidden: true }
119 241
]

+ 13 - 1
src/styles/element-ui.scss

@ -50,4 +50,16 @@
50 50
      padding: 12px 50px;
51 51
    }
52 52
  }
53
}
53
}
54
55
.el-select {
56
  width:100%
57
}
58
59
.el-date-editor.el-input, .el-date-editor.el-input__inner{
60
  width:100%;
61
}
62
63
.el-table .cell{
64
  min-height: 23px
65
}

+ 7 - 5
src/styles/index.scss

@ -6,7 +6,6 @@
6 6
7 7
body {
8 8
  height: 100%;
9
  min-width:600px;
10 9
  -moz-osx-font-smoothing: grayscale;
11 10
  -webkit-font-smoothing: antialiased;
12 11
  text-rendering: optimizeLegibility;
@ -80,7 +79,7 @@ a:hover {
80 79
    position: relative;
81 80
    overflow:hidden;
82 81
    line-height: 40px;
83
    padding:15px 20px;
82
    padding:8px 20px;
84 83
    background:#ffffff;
85 84
    border-bottom:1px solid #dadada;
86 85
    .contain-title{
@ -97,7 +96,7 @@ a:hover {
97 96
    .contian-operate{
98 97
      position:absolute;
99 98
      right:20px;
100
      top:15px;
99
      top:8px;
101 100
    }
102 101
  }
103 102
  .content-container{
@ -108,8 +107,11 @@ a:hover {
108 107
      margin-bottom:15px;
109 108
      float:right;
110 109
      span{
111
      font-size:15px;
112
      color:#999;
110
        font-size:15px;
111
        color:#999;
112
      }
113
      .el-select{
114
        width: 120px;
113 115
      }
114 116
    }
115 117
  }

+ 48 - 1
src/styles/sidebar.scss

@ -1,4 +1,45 @@
1 1
#app {
2
  // 顶部导航 topnavbar
3
  .topnavbar {
4
    position: fixed;
5
    font-size: 0px;
6
    top: 0;
7
    left: 0;
8
    right: 0;
9
    height: 50px;
10
    line-height: 50px;
11
    z-index:1002;
12
    border-radius: 0px !important;
13
    background-color: $menuBg;
14
    border-bottom: 1px solid #e6e6e6;
15
    .topnavbarBox {
16
      position: relative;
17
      margin: auto;
18
      box-sizing: border-box;
19
      padding: 0 10px;
20
      .logo-container {
21
        font-size: 22px;
22
        font-weight: bold;
23
        color: #efefef;
24
        display: inline-block;
25
        position: absolute;
26
        left:10px;
27
        overflow: hidden;
28
      }
29
      .name-box{
30
        display: inline-block;
31
        position: absolute;
32
        right: 20px;
33
        font-size:14px;
34
        overflow: hidden;
35
        color:#fff;
36
        .exit-btn {
37
          margin-left:30px;
38
          cursor: pointer;
39
        }
40
      }
41
    }
42
  }
2 43
  // 主体区域
3 44
  .main-container {
4 45
    min-height: 100%;
@ -13,9 +54,15 @@
13 54
    transition: width 0.28s;
14 55
    width: 200px !important;
15 56
    height: 100%;
16
    float: left;
57
    position: fixed;
17 58
    font-size: 0px;
59
    top: 50px;
60
    bottom: 0;
61
    left: 0;
62
    padding-bottom: 50px;
63
    z-index: 1001;
18 64
    overflow: hidden;
65
    background-color: $menuBg;
19 66
    //reset element-ui css
20 67
    .horizontal-collapse-transition {
21 68
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;

+ 3 - 3
src/styles/variables.scss

@ -1,4 +1,4 @@
1 1
//sidebar
2
$menuBg:#1a76a5;
3
$subMenuBg:#146792;
4
$menuHover:#105477;
2
$menuBg:#20436b;
3
$subMenuBg:#052d5a;
4
$menuHover:#1c3d6f;

+ 20 - 0
src/utils/comTable.js

@ -0,0 +1,20 @@
1
/**
2
 * Created by luyanan on 18/11/23.
3
 * gapFilling
4
 * 补全空行
5
 */
6
7
/* eslint-disable one-var */
8
var defaultPageSize = 20,
9
  gapFilling = function(tData, pageS) {
10
    const pageSize = pageS ? pageS : defaultPageSize
11
    const needNum = pageSize - tData.length % pageSize
12
    for (let i = 0; i < needNum; ++i) {
13
      tData.push(i)
14
    }
15
  },
16
  ret = {
17
    gapFilling: gapFilling
18
  }
19
20
export default ret

+ 7 - 7
src/utils/index.js

@ -12,15 +12,15 @@ export function urlParse(name) {
12 12
  return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || ['', ''])[1].replace(/\+/g, '%20')) || null
13 13
}
14 14
15
export function parseTime(startTime, flag, fa) {
15
export function trimStr(str) {
16
  return str.replace(/(^\s*)|(\s*$)/g, '')
17
}
18
19
export function parseTime(date, flag) {
16 20
  if (flag) {
17
    if (!fa) {
18
      return startTime.substring(0, 4) + '年' + startTime.substring(4, 6) + '月' + startTime.substring(6, 8) + '日 ' + startTime.substring(8, 10) + ':' + startTime.substring(10, 12) + ':' + startTime.substring(12, 14)
19
    } else {
20
      return startTime.substring(0, 4) + '/' + startTime.substring(4, 6) + '/' + startTime.substring(6, 8) + ' ' + startTime.substring(8, 10) + ':' + startTime.substring(10, 12) + ':' + startTime.substring(12, 14)
21
    }
21
    return date.substring(0, 4) + '年' + date.substring(4, 6) + '月' + date.substring(6, 8) + '日 ' + date.substring(8, 10) + ':' + date.substring(10, 12) + ':' + date.substring(12, 14)
22 22
  } else {
23
    return startTime.substring(0, 4) + '/' + startTime.substring(4, 6) + '/' + startTime.substring(6, 8)
23
    return date.substring(0, 4) + '/' + date.substring(4, 6) + '/' + date.substring(6, 8) + ' ' + date.substring(8, 10) + ':' + date.substring(10, 12) + ':' + date.substring(12, 14)
24 24
  }
25 25
}
26 26

+ 3 - 3
src/utils/queryDict.js

@ -1,7 +1,7 @@
1 1
/**
2
 * Created by luyanan on 18/8/23.
3
 * 'ZLLX'----'传感器主缆'
4
 * 'ZLWZ'----'传感器位置'
2
 * Created by luyanan on 18/11/22.
3
 * 'QYGM'----'企业规模'
4
 * 'QYLX'----'企业类型'
5 5
 * 'XZQH'----'城市级联'
6 6
 */
7 7
/* eslint-disable one-var */

+ 13 - 3
src/utils/request.js

@ -41,12 +41,11 @@ service.interceptors.response.use(response => {
41 41
    }
42 42
    return taR
43 43
  } else {
44
    Message.error({ response })
44
    Message.error('2333')
45 45
    return Promise.resolve(response)
46 46
  }
47 47
}, error => {
48
  const text = JSON.parse(JSON.stringify(error)).response.status === 404 ? '404' : '网络异常,请重试'
49
  Message.error({ text })
48
  Message.error('服务器连接失败,请重新')
50 49
  return Promise.reject(error)
51 50
})
52 51
@ -72,6 +71,17 @@ var ret = {
72 71
    }).catch(err => {
73 72
      if (eh) eh(err)
74 73
    })
74
  },
75
  put: function(url, Da, sh, eh) {
76
    service({
77
      method: 'put',
78
      url: url,
79
      data: Da
80
    }).then(res => {
81
      sh(res)
82
    }).catch(err => {
83
      if (eh) eh(err)
84
    })
75 85
  }
76 86
}
77 87

+ 0 - 78
src/utils/timingConstruct.js

@ -1,78 +0,0 @@
1
/**
2
 * Created by luyanan on 18/9/4.
3
 * construct monitor
4
 */
5
/* eslint-disable one-var */
6
import { parseTime } from '@/utils/index'
7
8
var monitorModel = {
9
  construct: function(mCache, $data) {
10
    for (let i = 0; i < $data.length; ++i) {
11
      if ($data[i].ctime === $data[0].ctime) {
12
        mCache.push({
13
          cid: $data[i].cid,
14
          cd: {
15
            tit: '',
16
            xData: [],
17
            seData: []
18
          }
19
        })
20
      }
21
    }
22
  },
23
  fixData: function(item, ftbegin, ftend, $daI) {
24
    if ($daI) {
25
      item.xData.push(parseTime(ftbegin, true, true))
26
      item.xData.push(parseTime(ftend, true, true))
27
      item.seData.push($daI.hvalue)
28
      item.seData.push($daI.lvalue)
29
      item.tit = $daI.cid
30
    } else {
31
      item.xData.push(parseTime(ftbegin, true, true))
32
      item.xData.push(parseTime(ftend, true, true))
33
      item.seData.push(0)
34
      item.seData.push(0)
35
    }
36
  },
37
  shiftData: function(item) {
38
    item.xData.shift()
39
    item.xData.shift()
40
    item.seData.shift()
41
    item.seData.shift()
42
  },
43
  setData: function(mCache, $data, ftbegin, ftend, maxNum) {
44
    if ($data.length) {
45
      for (let n = 0; n < mCache.length; ++n) {
46
        let found_c = false
47
        for (let m = 0; m < $data.length; ++m) {
48
          var tj = ($data[m].cid === mCache[n].cid && (ftbegin === $data[m].ctime))
49
          if (maxNum) {
50
            tj = ($data[m].cid === mCache[n].cid)
51
          }
52
          if (tj) {
53
            found_c = true
54
            this.fixData(mCache[n].cd, ftbegin, ftend, $data[m])
55
            break
56
          }
57
        }
58
        if (!found_c) {
59
          this.fixData(mCache[n].cd, ftbegin, ftend)
60
        }
61
62
        if (maxNum && mCache[n].cd.xData.length > maxNum) {
63
          this.shiftData(mCache[n].cd)
64
        }
65
      }
66
    } else {
67
      for (let k = 0; k < mCache.length; ++k) {
68
        this.fixData(mCache[k].cd, ftbegin, ftend)
69
70
        if (maxNum && mCache[k].cd.xData.length > maxNum) {
71
          this.shiftData(mCache[k].cd)
72
        }
73
      }
74
    }
75
  }
76
}
77
78
export default monitorModel

+ 61 - 0
src/utils/validator.js

@ -0,0 +1,61 @@
1
/**
2
 * Created by luyanan on 18/11/21.
3
 * form validator rules
4
 */
5
6
export function focusFun(rule, value, callback) {
7
  if (value !== '') {
8
    if (value) {
9
      callback(new Error(`请填写${this.maxlength}字以内机构名称`))
10
    } else {
11
      callback()
12
    }
13
  } else {
14
    callback()
15
  }
16
}
17
18
// 邮箱,@,50个字
19
export function checkEmailV(rule, value, callback) {
20
  const reg = /^([A-Za-z0-9_\-\.\u4e00-\u9fa5])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,8})$/
21
  if (!reg.test(value)) {
22
    return callback(new Error('请填写正确的邮箱格式'))
23
  } else {
24
    return callback()
25
  }
26
  // if (value.length) {
27
  //   return callback(new Error('请填写50字以内的邮箱地址'))
28
  // }
29
}
30
31
// 电话,50个字
32
export function checkPhoneV(rule, value, callback) {
33
  // const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
34
  if (value.length) {
35
    return callback(new Error('请填写50字以内的电话号码'))
36
  } else {
37
    return callback()
38
  }
39
}
40
41
// 类似金钱,首位不为0,最多2位小数
42
export function checkNumPot2(rule, value, callback) {
43
  const reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2,3})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
44
  if (value === '') {
45
    callback()
46
  } else if (!reg.test(value)) {
47
    callback(new Error('请填写数字,最多2位小数'))
48
  }
49
}
50
51
// 邮编,限制只能输入数字,20个字
52
export function checkInterNum(rule, value, callback) {
53
  const reg = /^[0-9]*[1-9][0-9]*$/
54
  if (!value) {
55
    return callback()
56
  } else if (!reg.test(value)) {
57
    return callback(new Error('请输入正确邮编'))
58
  } else {
59
    callback()
60
  }
61
}

+ 89 - 0
src/views/companyCen/activeList.vue

@ -0,0 +1,89 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">已激活企业</div>
5
      <div class="contain-search">
6
        <el-input placeholder="搜索企业名称" v-model="searchText" class="input-with-select">
7
          <el-button slot="append" icon="el-icon-search"></el-button>
8
        </el-input>
9
      </div>
10
    </div>
11
    <div class="content-container">
12
      <complex-table :tableData="tableData" :tableItem="tableItem"></complex-table>
13
    </div>
14
  </div>
15
</template>
16
17
<script>
18
import complexTable from '@/components/complexTable'
19
export default {
20
  data() {
21
    return {
22
      searchText: '',
23
      selectMode: '',
24
      tableData: [
25
        {
26
          date: '2018/08/25 16:32',
27
          name: '关于征集企业技术创新需求的通知',
28
          class: '通知公告',
29
          owner: '张贝贝',
30
          num: '4552'
31
        }, {
32
          date: '2018/08/25 16:32',
33
          name: '关于征集企业技术创新需求的通知',
34
          class: '通知公告',
35
          owner: '张贝贝',
36
          num: '4552'
37
        }, {
38
          date: '2018/08/25 16:32',
39
          name: '关于征集企业技术创新需求的通知',
40
          class: '通知公告',
41
          owner: '张贝贝',
42
          num: '4552'
43
        }, {
44
          date: '2018/08/25 16:32',
45
          name: '关于征集企业技术创新需求的通知',
46
          class: '通知公告',
47
          owner: '张贝贝',
48
          num: '4552'
49
        }
50
      ],
51
      tableItem: [
52
        {
53
          prop: 'name',
54
          tit: '标题'
55
        },
56
        {
57
          prop: 'class',
58
          tit: '栏目分类',
59
          width: '160'
60
        },
61
        {
62
          prop: 'owner',
63
          tit: '发布人',
64
          width: '160'
65
        },
66
        {
67
          prop: 'date',
68
          tit: '发布时间',
69
          width: '160'
70
        },
71
        {
72
          prop: 'num',
73
          tit: '浏览数量',
74
          width: '160'
75
        },
76
        {
77
          operate: 'edit',
78
          width: '200'
79
        }
80
      ]
81
    }
82
  },
83
  components: {
84
    complexTable
85
  },
86
  methods: {
87
  }
88
}
89
</script>

+ 5 - 0
src/views/companyCen/noactive/compHome.vue

@ -0,0 +1,5 @@
1
<template>
2
  <div>
3
    <router-view></router-view>
4
  </div>
5
</template>

+ 452 - 0
src/views/companyCen/noactive/compInfo.vue

@ -0,0 +1,452 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">企业信息</div>
5
      <div class="contian-operate">
6
        <el-button type="primary" @click="queryCompanyProduct">企业产品</el-button>
7
      </div>
8
    </div>
9
    <div class="content-container">
10
      <div class="main-info">
11
        <el-form :model="formObj" :rules="rules" ref="formObj" label-width="86px" class="update-wrapper demo-ruleForm">
12
          <el-row :gutter="25">
13
            <el-col :span="14">
14
              <el-row :gutter="20" class="update-main">
15
                <el-col :span="24">
16
                  <el-form-item class="is-required" label="企业名称" prop="name">
17
                    <el-input v-model="formObj.name" placeholder="请填写企业全部名称" maxlength="50"></el-input>
18
                  </el-form-item>
19
                </el-col>
20
                <el-col :span="12">
21
                  <el-form-item label="创立年份" prop="createYear">
22
                    <el-date-picker
23
                      :editable="false"
24
                      v-model="formObj.createYear"
25
                      type="year"
26
                      placeholder="请选择企业的创立年份">
27
                    </el-date-picker>
28
                  </el-form-item>
29
                </el-col>
30
                <el-col :span="12">
31
                  <el-form-item label="官方网址" prop="website">
32
                    <el-input v-model="formObj.website" placeholder="如: www.ekexiu.xom"></el-input>
33
                  </el-form-item>
34
                </el-col>
35
                <el-col :span="12">
36
                  <el-form-item label="企业规模" prop="">
37
                    <el-select v-model="selectLongTime" placeholder="请选择员工数量范围">
38
                      <el-option
39
                        v-for="item in longTime"
40
                        :key="item.value"
41
                        :label="item.label"
42
                        :value="item.value"
43
                        @current-change="item.value">
44
                      </el-option>
45
                    </el-select>
46
                  </el-form-item>
47
                </el-col>
48
                <el-col :span="12">
49
                  <el-form-item label="企业类型" prop="createYear">
50
                    <el-select v-model="selectLongTime" placeholder="请选择最符合的一项">
51
                      <el-option
52
                        v-for="item in longTime"
53
                        :key="item.value"
54
                        :label="item.label"
55
                        :value="item.value"
56
                        @current-change="item.value">
57
                      </el-option>
58
                    </el-select>
59
                  </el-form-item>
60
                </el-col>
61
                <el-col :span="12">
62
                  <el-form-item label="所在城市" prop="">
63
                    <cityPicker></cityPicker>
64
                  </el-form-item>
65
                </el-col>
66
                <el-col :span="12">
67
                  <el-form-item label="企业邮编" prop="website">
68
                    <el-input v-model="formObj.website" type="number" placeholder="请填写企业邮编" maxlength="20"></el-input>
69
                  </el-form-item>
70
                </el-col>
71
                <el-col :span="24">
72
                  <el-form-item label="企业地址" prop="address">
73
                    <el-input v-model="formObj.address" placeholder="请填写企业详细地址" maxlength="50"></el-input>
74
                  </el-form-item>
75
                </el-col>
76
                <el-col :span="12">
77
                  <el-form-item label="联系人" prop="linkman">
78
                    <el-input v-model="formObj.linkman" placeholder="请填写企业联系人" maxlength="10"></el-input>
79
                  </el-form-item>
80
                </el-col>
81
                <el-col :span="12"></el-col>
82
                <el-col :span="12">
83
                  <el-form-item label="联系电话" prop="tel">
84
                    <el-input v-model="formObj.tel" placeholder="请填写联系电话" maxlength="50"></el-input>
85
                  </el-form-item>
86
                </el-col>
87
                <el-col :span="12">
88
                  <el-form-item label="联系邮箱" prop="mail">
89
                    <el-input v-model="formObj.mail" placeholder="请填写联系邮箱" maxlength="50"></el-input>
90
                  </el-form-item>
91
                </el-col>
92
                <el-col :span="12">
93
                  <el-form-item label="客服电话" prop="tel">
94
                    <el-input v-model="formObj.tel" placeholder="请填写客服电话" maxlength="50"></el-input>
95
                  </el-form-item>
96
                </el-col>
97
                <el-col :span="12"></el-col>
98
                <el-col :span="12">
99
                  <el-form-item label="工作时间" prop="linkman">
100
                    <el-input v-model="formObj.linkman" placeholder="请填写客服工作时间" maxlength="50"></el-input>
101
                  </el-form-item>
102
                </el-col>
103
                <el-col :span="12">
104
                  <el-form-item label="客服邮箱" prop="mail">
105
                    <el-input v-model="formObj.mail" placeholder="请填写客服邮箱" maxlength="50"></el-input>
106
                  </el-form-item>
107
                </el-col>
108
                <el-col :span="24">
109
                  <el-form-item label="所属行业">
110
                    <dynamicTags :tagInfo="tagIndustry" :dyStr="formObj.industry" v-on:turnTags="turnIndustryTags($event)" ref="tagComponent"></dynamicTags>
111
                  </el-form-item>
112
                </el-col>
113
                <el-col :span="24">
114
                  <el-form-item label="专注领域">
115
                    <dynamicTags :tagInfo="tagSubject" :dyStr="formObj.subject" v-on:turnTags="turnSubjectTags($event)"></dynamicTags>
116
                  </el-form-item>
117
                </el-col>
118
                
119
                <!-- :labelW="80"
120
                  :widthselect="200"
121
                  :prov="province"
122
                  :city="city"
123
                  v-on:selectProv="getSelectProv($event)"
124
                  v-on:selectCity="getSelectCity($event)" -->
125
                
126
                
127
                <el-col :span="24">
128
                  <el-form-item class="is-required" label="企业简介" prop="desc">
129
                    <el-input type="textarea" :rows="8" v-model="formObj.desc" placeholder="请填写一个简单的介绍,让大家更好地了解您的企业" maxlength="5000"></el-input>
130
                  </el-form-item>
131
                </el-col>
132
                <el-col :span="24">
133
                  <el-form-item label="企业资质">
134
                    <dynamicTags :tagInfo="tagProve" :dyStr="formObj.prove" v-on:turnTags="turnProveTags($event)"></dynamicTags>
135
                  </el-form-item>
136
                </el-col>
137
                <el-col :span="24">
138
                  <el-form-item label="供应商领域">
139
                    <dynamicTags :tagInfo="tagSubjectG" :dyStr="formObj.subjectG" v-on:turnTags="turnSubjectGTags($event)"></dynamicTags>
140
                  </el-form-item>
141
                </el-col>
142
                <el-col :span="24">
143
                  <el-form-item label="客户领域">
144
                    <dynamicTags :tagInfo="tagSubjectC" :dyStr="formObj.subjectC" v-on:turnTags="turnSubjectCTags($event)"></dynamicTags>
145
                  </el-form-item>
146
                </el-col>
147
                <el-col :span="24" class="el-btn-col">
148
                  <div class="el-btn-col-box">
149
                    <el-button type="primary" @click="submitForm('formObj')">保存</el-button>
150
                  </div>
151
                </el-col>
152
              </el-row>
153
            </el-col>
154
            <el-col :span="10">
155
              <div class="update-logo">
156
                <el-upload
157
                  class="avatar-uploader"
158
                  :action="uploadUrl"
159
                  :show-file-list="false"
160
                  ref="uploadLogo"
161
                  :on-success="handleAvatarSuccess"
162
                  :before-upload="beforeAvatarUpload">
163
                  <img v-if="imageUrl" :src="imageUrl" class="avatar">
164
                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
165
                </el-upload>
166
                <div class="update-tip">PNG/JPG/JPEG格式<br>大小2M以内</div>
167
              </div>
168
            </el-col>
169
          </el-row>
170
        </el-form>
171
      </div>
172
    </div>
173
  </div>
174
</template>
175
176
<script>
177
  import queryDict from '@/utils/queryDict'
178
179
  import cityPicker from '@/components/CityPicker'
180
  import dynamicTags from '@/components/DynamicTags'
181
182
  export default {
183
    props: {
184
      plat: {
185
        type: Object
186
      }
187
    },
188
    components: {
189
      dynamicTags,
190
      cityPicker
191
    },
192
    data() {
193
      return {
194
        tagIndustry: {
195
          lableTit: '所属行业',
196
          placeholder: '请填写企业所属的行业,如:制造业、互联网、服务业',
197
          limitCount: 15,
198
          tagsNum: 3
199
        },
200
        tagSubject: {
201
          lableTit: '专注领域',
202
          placeholder: '请填写企业专注的领域,如:腐蚀防护、石墨烯、纳米材料',
203
          limitCount: 15,
204
          tagsNum: 20
205
        },
206
        tagProve: {
207
          lableTit: '企业资质',
208
          placeholder: '请填写企业获得的资质,如:ISO9000认证、高新技术企业认证',
209
          limitCount: 50,
210
          tagsNum: 5,
211
          tagblock: true
212
        },
213
        tagSubjectG: {
214
          lableTit: '供应商领域',
215
          placeholder: '请填写企业上游所涉及的领域',
216
          limitCount: 15,
217
          tagsNum: 10
218
        },
219
        tagSubjectC: {
220
          lableTit: '客户领域',
221
          placeholder: '请填写企业下游所涉及的领域',
222
          limitCount: 15,
223
          tagsNum: 5
224
        },
225
        plf_user: '',
226
        plf_name: '',
227
        imageUrl: '', // 临时地址
228
        imgName: '', // 图片的name
229
        uploadUrl: '',
230
        // httpUrl.hQuery.baseInfo.upload
231
        // optionsCity: provinceAndCityData,
232
        // selectedOptions: [],
233
        dynamicTags: [],
234
        isShowAdd: true,
235
        inputVisible: false,
236
        inputValue: '',
237
        province: '',
238
        city: '',
239
        formObj: {
240
          name: '',
241
          linkman: '',
242
          tel: '',
243
          mail: '',
244
          address: '',
245
          website: '',
246
          industry: '',
247
          subject: '',
248
          desc: '',
249
          prove: '',
250
          subjectG: '',
251
          subjectC: ''
252
        },
253
        rules: {
254
          mail: [
255
            { type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
256
          ]
257
        }
258
      }
259
    },
260
    computed: {
261
    },
262
    created() {
263
      this.getDictoryData()
264
      // this.plf_user = Cookies.get('plf_user')
265
      // this.getPlatInfo(this.plf_user)
266
    },
267
    methods: {
268
      getDictoryData() {
269
        const that = this
270
        queryDict.applyDict('QYGM', function(dictData) {
271
          dictData.map(item => {
272
            that.cableMain[item.code] = item.caption
273
          })
274
        }) // 企业规模
275
        queryDict.applyDict('QYLX', function(dictData) {
276
          dictData.map(item => {
277
            that.addr[item.code] = item.caption
278
          })
279
        }) // 企业类型
280
        queryDict.applyDict('XZQH', function(dictData) {
281
          dictData.map(item => {
282
            that.citys[item.code] = item.fullCaption
283
          })
284
        }) // 城市级联
285
      },
286
      queryCompanyProduct() {
287
        this.$router.replace({ name: 'compProduct' })
288
      },
289
      turnIndustryTags(msg) {
290
        this.formObj.industry = msg
291
      },
292
      turnSubjectTags(msg) {
293
        this.formObj.subject = msg
294
      },
295
      turnProveTags(msg) {
296
        this.formObj.prove = msg
297
      },
298
      turnSubjectGTags(msg) {
299
        this.formObj.subjectG = msg
300
      },
301
      turnSubjectCTags(msg) {
302
        this.formObj.subjectC = msg
303
      },
304
      getSelectProv(prov) {
305
        this.province = prov
306
      },
307
      getSelectCity(city) {
308
        this.city = city
309
      },
310
      getPlatInfo(id) {
311
        // this.$axios.get(httpUrl.hQuery.baseInfo.query, {
312
        //   params: {
313
        //     id: id
314
        //   }
315
        // }).then((res) => {
316
        //   console.log(res);
317
        //   let str = res.data;
318
        //   this.plf_name = str.name;
319
        //   this.imageUrl = str.logo ? util.ImageUrl('platform' + str.logo) : util.defaultSet.img.plat;
320
        //   this.imgName = str.logo;
321
        //   this.ruleFormUpdate.linkman = str.linkman;
322
        //   this.ruleFormUpdate.tel = str.linkphone;
323
        //   this.ruleFormUpdate.mail = str.linkemail;
324
        //   if (str.province) {
325
        //     this.province = str.province;
326
        //   }
327
        //   if (str.city) {
328
        //     this.city = str.city;
329
        //   }
330
        //   this.ruleFormUpdate.address = str.addr;
331
        //   this.ruleFormUpdate.website = str.url;
332
        //   if (str.industry) {
333
        //     this.ruleFormUpdate.industry = str.industry;
334
        //     this.dynamicTags = str.industry.split(',');
335
        //     if (this.dynamicTags.length === 10) {
336
        //       this.isShowAdd = false;
337
        //     }
338
        //   }
339
        //   this.ruleFormUpdate.desc = str.descp;
340
        // });
341
      },
342
      submitForm(formName) {
343
        this.$refs[formName].validate((valid) => {
344
          if (valid) {
345
            this.$refs.uploadLogo.submit() // 确认上传图片
346
            if (this.province) {
347
              if (!this.city) {
348
                this.$alert('请您选择所在城市', '提示', {
349
                  confirmButtonText: '确定',
350
                  type: 'warning',
351
                  center: true
352
                })
353
                return
354
              }
355
            }
356
            // let paramsData = {
357
            //   'id': this.plf_user,
358
            //   'name': this.plf_name,
359
            //   'linkman': this.ruleFormUpdate.linkman,
360
            //   'logo': this.imgName,
361
            //   'linkphone': this.ruleFormUpdate.tel,
362
            //   'linkemail': this.ruleFormUpdate.mail,
363
            //   'province': this.province,
364
            //   'city': this.city,
365
            //   'addr': this.ruleFormUpdate.address,
366
            //   'url': this.ruleFormUpdate.website,
367
            //   'industry': this.ruleFormUpdate.industry,
368
            //   'descp': this.ruleFormUpdate.desc
369
            // }
370
            // this.$axios.post(httpUrl.hQuery.baseInfo.update, paramsData).then((res) => {
371
            //   this.$message({
372
            //     message: '平台信息修改成功!',
373
            //     type: 'success'
374
            //   });
375
            //   Cookies.set('plf_logo', this.imgName);
376
            //   this.$router.push({path: '/WorkHome'});
377
            //   this.reload();
378
            // }).catch(error => {
379
            //   console.log(error);
380
            // });
381
          } else {
382
            return false
383
          }
384
        })
385
      },
386
      // upload img
387
      handleAvatarSuccess(res, file) {
388
        this.imageUrl = URL.createObjectURL(file.raw)
389
        this.imgName = res.data[0].uri
390
      },
391
      beforeAvatarUpload(file) {
392
        const isJPG = file.type === 'image/jpeg'
393
        const isPNG = file.type === 'image/png'
394
        const isLt2M = file.size / 1024 / 1024 < 2
395
        if (!isJPG && !isPNG) {
396
          this.$message.error('请上传PNG/JPG/JPEG格式的图片')
397
        }
398
        if (!isLt2M) {
399
          this.$message.error('上传logo大小不能超过 2MB!')
400
        }
401
        return (!isJPG || !isPNG) && isLt2M
402
      }
403
      // upload img
404
    }
405
  }
406
</script>
407
408
<style rel="stylesheet/scss" lang="scss">
409
  .main-info{
410
    /*min-width: 1100px;*/
411
    .update-logo{
412
      width: 280px;
413
      .avatar-uploader{
414
        .el-upload{
415
          /*center-items(280px,187px);*/
416
          border: 1px dashed #d9d9d9;
417
          cursor: pointer;
418
          position: relative;
419
          .el-upload:hover {
420
            border-color: #dadada;
421
          }
422
          .avatar-uploader-icon{
423
            font-size: 40px;
424
            color: #8c939d;
425
            width: 280px;
426
            height: 187px;
427
            line-height: 187px;
428
            text-align: center;
429
          }
430
        }
431
      }
432
      .update-tip{
433
        margin-top:15px;
434
        text-align:center;
435
        font-size:14px;
436
        /*color:$secondaryFont;*/
437
      }
438
    }
439
    .update-main{
440
      padding-left:25px;
441
      .update-title{
442
        font-size:30px;
443
        line-height:54px;
444
        margin-bottom:16px;
445
        padding-left:10px;
446
      }
447
    }
448
    .shortW{
449
      width:300px;
450
    }
451
  }
452
</style>

+ 132 - 0
src/views/companyCen/noactive/compProduct.vue

@ -0,0 +1,132 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">企业产品</div>
5
      <div class="contian-operate" v-if="companyId">
6
        <el-button type="primary" @click="queryProductInfo">发布产品</el-button>
7
      </div>
8
    </div>
9
    <div class="content-container">
10
      <div class="select-box" v-if="!companyId">
11
        <p>请选择需要查看的企业</p>
12
        <el-select
13
          v-model="value9"
14
          filterable
15
          remote
16
          reserve-keyword
17
          maxlength="50"
18
          placeholder="请输入关键词"
19
          :remote-method="remoteMethod"
20
          :loading="loading"
21
          suffix-icon="el-icon-search">
22
          <el-option
23
            v-for="item in options4"
24
            :key="item.value"
25
            :label="item.label"
26
            :value="item.value">
27
          </el-option>
28
        </el-select>
29
      </div>
30
      <div v-else>
31
        <div class="lit-tit">显示企业名称</div>
32
        <complex-table :tableData="tableData" :tableItem="tableItem"></complex-table>
33
      </div>
34
    </div>
35
  </div>
36
</template>
37
38
<script>
39
  import complexTable from '@/components/complexTable'
40
  export default {
41
    data() {
42
      return {
43
        companyId: '253',
44
        searchText: '',
45
        selectMode: '',
46
        tableData: [
47
          {
48
            date: '2018/08/25 16:32',
49
            name: '关于征集企业技术创新需求的通知',
50
            class: '通知公告',
51
            owner: '张贝贝',
52
            num: '4552'
53
          }, {
54
            date: '2018/08/25 16:32',
55
            name: '关于征集企业技术创新需求的通知',
56
            class: '通知公告',
57
            owner: '张贝贝',
58
            num: '4552'
59
          }, {
60
            date: '2018/08/25 16:32',
61
            name: '关于征集企业技术创新需求的通知',
62
            class: '通知公告',
63
            owner: '张贝贝',
64
            num: '4552'
65
          }, {
66
            date: '2018/08/25 16:32',
67
            name: '关于征集企业技术创新需求的通知',
68
            class: '通知公告',
69
            owner: '张贝贝',
70
            num: '4552'
71
          }
72
        ],
73
        tableItem: [
74
          {
75
            prop: 'name',
76
            tit: '标题'
77
          },
78
          {
79
            prop: 'class',
80
            tit: '栏目分类',
81
            width: '160'
82
          },
83
          {
84
            prop: 'owner',
85
            tit: '发布人',
86
            width: '160'
87
          },
88
          {
89
            prop: 'date',
90
            tit: '发布时间',
91
            width: '160'
92
          },
93
          {
94
            prop: 'num',
95
            tit: '浏览数量',
96
            width: '160'
97
          },
98
          {
99
            operate: 'edit',
100
            width: '200'
101
          }
102
        ]
103
      }
104
    },
105
    components: {
106
      complexTable
107
    },
108
    methods: {
109
      queryProductInfo() {
110
        this.$router.replace({ name: 'productInfo' })
111
      }
112
    }
113
  }
114
</script>
115
116
<style rel="stylesheet/scss" lang="scss">
117
  .select-box{
118
    width:350px;
119
    margin: 15% auto 22%;
120
    p{
121
      font-size: 20px;
122
      font-weight: bold;
123
      line-height: 40px;
124
      text-align: center;
125
    }
126
  }
127
  .lit-tit{
128
    font-size: 17px;
129
    line-height: 30px;
130
    margin-bottom: 10px;
131
  }
132
</style>

+ 6 - 0
src/views/companyCen/noactive/index.vue

@ -0,0 +1,6 @@
1
<template>
2
  <div>
3
    <router-view></router-view>
4
  </div>
5
</template>
6

+ 95 - 0
src/views/companyCen/noactive/noactiveList.vue

@ -0,0 +1,95 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">未激活企业</div>
5
      <div class="contain-search">
6
        <el-input placeholder="搜索企业名称" v-model="searchText" class="input-with-select">
7
          <el-button slot="append" icon="el-icon-search"></el-button>
8
        </el-input>
9
      </div>
10
      <div class="contian-operate">
11
        <el-button type="primary" @click="queryCompanyInfo">添加企业</el-button>
12
      </div>
13
    </div>
14
    <div class="content-container">
15
      <complex-table :tableData="tableData" :tableItem="tableItem"></complex-table>
16
    </div>
17
  </div>
18
</template>
19
20
<script>
21
import complexTable from '@/components/complexTable'
22
export default {
23
  data() {
24
    return {
25
      searchText: '',
26
      selectMode: '',
27
      tableData: [
28
        {
29
          date: '2018/08/25 16:32',
30
          name: '关于征集企业技术创新需求的通知',
31
          class: '通知公告',
32
          owner: '张贝贝',
33
          num: '4552'
34
        }, {
35
          date: '2018/08/25 16:32',
36
          name: '关于征集企业技术创新需求的通知',
37
          class: '通知公告',
38
          owner: '张贝贝',
39
          num: '4552'
40
        }, {
41
          date: '2018/08/25 16:32',
42
          name: '关于征集企业技术创新需求的通知',
43
          class: '通知公告',
44
          owner: '张贝贝',
45
          num: '4552'
46
        }, {
47
          date: '2018/08/25 16:32',
48
          name: '关于征集企业技术创新需求的通知',
49
          class: '通知公告',
50
          owner: '张贝贝',
51
          num: '4552'
52
        }
53
      ],
54
      tableItem: [
55
        {
56
          prop: 'name',
57
          tit: '标题'
58
        },
59
        {
60
          prop: 'class',
61
          tit: '栏目分类',
62
          width: '160'
63
        },
64
        {
65
          prop: 'owner',
66
          tit: '发布人',
67
          width: '160'
68
        },
69
        {
70
          prop: 'date',
71
          tit: '发布时间',
72
          width: '160'
73
        },
74
        {
75
          prop: 'num',
76
          tit: '浏览数量',
77
          width: '160'
78
        },
79
        {
80
          operate: 'edit',
81
          width: '200'
82
        }
83
      ]
84
    }
85
  },
86
  components: {
87
    complexTable
88
  },
89
  methods: {
90
    queryCompanyInfo() {
91
      this.$router.replace({ name: 'compInfo' })
92
    }
93
  }
94
}
95
</script>

+ 5 - 0
src/views/companyCen/noactive/productHome.vue

@ -0,0 +1,5 @@
1
<template>
2
  <div>
3
    <router-view></router-view>
4
  </div>
5
</template>

+ 304 - 0
src/views/companyCen/noactive/productInfo.vue

@ -0,0 +1,304 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">产品详情</div>
5
    </div>
6
    <div class="content-container">
7
      <div class="main-info">
8
        <el-form :model="formObj" :rules="rules" ref="formObj" label-width="86px" class="update-wrapper demo-ruleForm">
9
          <el-row :gutter="25">
10
            <el-col :span="18">
11
              <el-row :gutter="20" class="update-main">
12
                <el-col :span="24" style="margin-bottom: 20px;margin-left:80px">
13
                  <el-upload
14
                    action="https://jsonplaceholder.typicode.com/posts/"
15
                    list-type="picture-card"
16
                    :on-preview="handlePictureCardPreview"
17
                    :on-remove="handleRemove">
18
                    <i class="el-icon-plus"></i>
19
                  </el-upload>
20
                  <el-dialog :visible.sync="dialogVisible">
21
                    <img width="100%" :src="dialogImageUrl" alt="">
22
                  </el-dialog>
23
                </el-col>
24
                <el-col :span="24">
25
                  <el-form-item class="is-required" label="产品名称" prop="name">
26
                    <el-input v-model="formObj.name" placeholder="请填写产品名称" maxlength="30"></el-input>
27
                  </el-form-item>
28
                </el-col>
29
                <el-col :span="24">
30
                  <el-form-item label="关键词">
31
                    <dynamicTags :tagInfo="tagSubject" :dyStr="formObj.subject" v-on:turnTags="turnSubjectTags($event)"></dynamicTags>
32
                  </el-form-item>
33
                </el-col>
34
                <el-col :span="24">
35
                  <el-form-item class="is-required" label="产品简介" prop="desc">
36
                    <el-input type="textarea" :rows="4" v-model="formObj.desc" placeholder="请填写产品简介" maxlength="250"></el-input>
37
                  </el-form-item>
38
                </el-col>
39
                <el-col :span="24">
40
                  <el-form-item label="厂商型号" prop="name">
41
                    <el-input v-model="formObj.name" placeholder="请填写厂商型号" maxlength="50"></el-input>
42
                  </el-form-item>
43
                </el-col>
44
                <el-col :span="12">
45
                  <el-form-item label="产地" prop="name">
46
                    <el-input v-model="formObj.name" placeholder="请填写产地" maxlength="50"></el-input>
47
                  </el-form-item>
48
                </el-col>
49
                <el-col :span="12">
50
                  <el-form-item label="官方价格" prop="name">
51
                    <el-input v-model="formObj.name" placeholder="请填写官方价格" maxlength="50"></el-input>
52
                  </el-form-item>
53
                </el-col>
54
                <el-col :span="24">
55
                  <el-form-item label="性能参数" prop="desc">
56
                    <el-input type="textarea" :rows="6" v-model="formObj.desc" placeholder="请填写产品简介" maxlength="1000"></el-input>
57
                  </el-form-item>
58
                </el-col>
59
                <el-col :span="24">
60
                  <el-form-item label="详情描述" prop="desc">
61
                    <el-input type="textarea" :rows="8" v-model="formObj.desc" placeholder="请填写产品详情" maxlength="5000"></el-input>
62
                  </el-form-item>
63
                </el-col>
64
                <el-col :span="24" class="el-btn-col">
65
                  <div class="el-btn-col-box">
66
                    <el-button type="primary" @click="submitForm('formObj')">发布产品</el-button>
67
                  </div>
68
                </el-col>
69
              </el-row>
70
            </el-col>
71
          </el-row>
72
        </el-form>
73
      </div>
74
    </div>
75
  </div>
76
</template>
77
78
<script>
79
  import cityPicker from '@/components/CityPicker'
80
  import dynamicTags from '@/components/DynamicTags'
81
82
  export default {
83
    props: {
84
      plat: {
85
        type: Object
86
      }
87
    },
88
    components: {
89
      dynamicTags,
90
      cityPicker
91
    },
92
    data() {
93
      return {
94
        tagIndustry: {
95
          lableTit: '所属行业',
96
          placeholder: '请填写企业所属的行业,如:制造业、互联网、服务业',
97
          limitCount: 15,
98
          tagsNum: 3
99
        },
100
        tagSubject: {
101
          lableTit: '专注领域',
102
          placeholder: '请填写企业专注的领域,如:腐蚀防护、石墨烯、纳米材料',
103
          limitCount: 15,
104
          tagsNum: 20
105
        },
106
        tagProve: {
107
          lableTit: '企业资质',
108
          placeholder: '请填写企业获得的资质,如:ISO9000认证、高新技术企业认证',
109
          limitCount: 50,
110
          tagsNum: 5,
111
          tagblock: true
112
        },
113
        tagSubjectG: {
114
          lableTit: '供应商领域',
115
          placeholder: '请填写企业上游所涉及的领域',
116
          limitCount: 15,
117
          tagsNum: 10
118
        },
119
        tagSubjectC: {
120
          lableTit: '客户领域',
121
          placeholder: '请填写企业下游所涉及的领域',
122
          limitCount: 15,
123
          tagsNum: 5
124
        },
125
        dialogImageUrl: '',
126
        dialogVisible: false,
127
        dynamicTags: [],
128
        isShowAdd: true,
129
        inputVisible: false,
130
        inputValue: '',
131
        province: '',
132
        city: '',
133
        formObj: {
134
          name: '',
135
          linkman: '',
136
          tel: '',
137
          mail: '',
138
          address: '',
139
          website: '',
140
          industry: '',
141
          subject: '',
142
          desc: '',
143
          prove: '',
144
          subjectG: '',
145
          subjectC: ''
146
        },
147
        rules: {
148
          mail: [
149
            { type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
150
          ]
151
        }
152
      }
153
    },
154
    computed: {
155
    },
156
    created() {
157
    },
158
    methods: {
159
      queryCompanyProduct() {
160
        this.$router.replace({ name: 'compProduct' })
161
      },
162
      turnSubjectTags(msg) {
163
        this.formObj.subject = msg
164
      },
165
      handleRemove(file, fileList) {
166
        console.log(file, fileList)
167
      },
168
      handlePictureCardPreview(file) {
169
        this.dialogImageUrl = file.url
170
        this.dialogVisible = true
171
      },
172
      getPlatInfo(id) {
173
        // this.$axios.get(httpUrl.hQuery.baseInfo.query, {
174
        //   params: {
175
        //     id: id
176
        //   }
177
        // }).then((res) => {
178
        //   console.log(res);
179
        //   let str = res.data;
180
        //   this.plf_name = str.name;
181
        //   this.imageUrl = str.logo ? util.ImageUrl('platform' + str.logo) : util.defaultSet.img.plat;
182
        //   this.imgName = str.logo;
183
        //   this.ruleFormUpdate.linkman = str.linkman;
184
        //   this.ruleFormUpdate.tel = str.linkphone;
185
        //   this.ruleFormUpdate.mail = str.linkemail;
186
        //   if (str.province) {
187
        //     this.province = str.province;
188
        //   }
189
        //   if (str.city) {
190
        //     this.city = str.city;
191
        //   }
192
        //   this.ruleFormUpdate.address = str.addr;
193
        //   this.ruleFormUpdate.website = str.url;
194
        //   if (str.industry) {
195
        //     this.ruleFormUpdate.industry = str.industry;
196
        //     this.dynamicTags = str.industry.split(',');
197
        //     if (this.dynamicTags.length === 10) {
198
        //       this.isShowAdd = false;
199
        //     }
200
        //   }
201
        //   this.ruleFormUpdate.desc = str.descp;
202
        // });
203
      },
204
      submitForm(formName) {
205
        this.$refs[formName].validate((valid) => {
206
          if (valid) {
207
            this.$refs.uploadLogo.submit() // 确认上传图片
208
            // let paramsData = {
209
            //   'id': this.plf_user,
210
            //   'name': this.plf_name,
211
            //   'linkman': this.ruleFormUpdate.linkman,
212
            //   'logo': this.imgName,
213
            //   'linkphone': this.ruleFormUpdate.tel,
214
            //   'linkemail': this.ruleFormUpdate.mail,
215
            //   'province': this.province,
216
            //   'city': this.city,
217
            //   'addr': this.ruleFormUpdate.address,
218
            //   'url': this.ruleFormUpdate.website,
219
            //   'industry': this.ruleFormUpdate.industry,
220
            //   'descp': this.ruleFormUpdate.desc
221
            // }
222
            // this.$axios.post(httpUrl.hQuery.baseInfo.update, paramsData).then((res) => {
223
            //   this.$message({
224
            //     message: '平台信息修改成功!',
225
            //     type: 'success'
226
            //   });
227
            //   Cookies.set('plf_logo', this.imgName);
228
            //   this.$router.push({path: '/WorkHome'});
229
            //   this.reload();
230
            // }).catch(error => {
231
            //   console.log(error);
232
            // });
233
          } else {
234
            return false
235
          }
236
        })
237
      },
238
      // upload img
239
      handleAvatarSuccess(res, file) {
240
        this.imageUrl = URL.createObjectURL(file.raw)
241
        this.imgName = res.data[0].uri
242
      },
243
      beforeAvatarUpload(file) {
244
        const isJPG = file.type === 'image/jpeg'
245
        const isPNG = file.type === 'image/png'
246
        const isLt2M = file.size / 1024 / 1024 < 2
247
        if (!isJPG && !isPNG) {
248
          this.$message.error('请上传PNG/JPG/JPEG格式的图片')
249
        }
250
        if (!isLt2M) {
251
          this.$message.error('上传logo大小不能超过 2MB!')
252
        }
253
        return (!isJPG || !isPNG) && isLt2M
254
      }
255
      // upload img
256
    }
257
  }
258
</script>
259
260
<style rel="stylesheet/scss" lang="scss">
261
  .main-info{
262
    /*min-width: 1100px;*/
263
    .update-logo{
264
      width: 280px;
265
      .avatar-uploader{
266
        .el-upload{
267
          /*center-items(280px,187px);*/
268
          border: 1px dashed #d9d9d9;
269
          cursor: pointer;
270
          position: relative;
271
          .el-upload:hover {
272
            border-color: #dadada;
273
          }
274
          .avatar-uploader-icon{
275
            font-size: 40px;
276
            color: #8c939d;
277
            width: 280px;
278
            height: 187px;
279
            line-height: 187px;
280
            text-align: center;
281
          }
282
        }
283
      }
284
      .update-tip{
285
        margin-top:15px;
286
        text-align:center;
287
        font-size:14px;
288
        /*color:$secondaryFont;*/
289
      }
290
    }
291
    .update-main{
292
      padding-left:25px;
293
      .update-title{
294
        font-size:30px;
295
        line-height:54px;
296
        margin-bottom:16px;
297
        padding-left:10px;
298
      }
299
    }
300
    .shortW{
301
      width:300px;
302
    }
303
  }
304
</style>

+ 5 - 14
src/views/layout/Layout.vue

@ -1,15 +1,10 @@
1 1
<template>
2 2
  <div class="app-wrapper" :class="classObj">
3
     <!-- v-if="device==='mobile'&&sidebar.opened"  @click="handleClickOutside" -->
4
    <!-- <div class="drawer-bg"></div> -->
5 3
    <TopNavbar></TopNavbar>
6
    <!-- <Navigation v-if="roles.indexOf('2')<0" ></Navigation> -->
7
    <div class='containerBox'>
8
      <sidebar class="sidebar-container"></sidebar>
9
      <div class="main-container" style='padding-top:0px;'>
10
        <navbar></navbar>
11
        <app-main></app-main>
12
      </div>
4
    <sidebar class="sidebar-container"></sidebar>
5
    <navbar></navbar>
6
    <div class="main-container">
7
      <app-main></app-main>
13 8
    </div>
14 9
  </div>
15 10
</template>
@ -64,15 +59,11 @@ export default {
64 59
    @include clearfix;
65 60
    position: relative;
66 61
    height: 100%;
62
    width: 100%;
67 63
    &.mobile.openSidebar{
68 64
      position: fixed;
69 65
      top: 0;
70 66
    }
71
    .containerBox {
72
      margin: auto;
73
      box-sizing: border-box;
74
      height:100%;
75
    }
76 67
  }
77 68
  .drawer-bg {
78 69
    background: #000;

+ 3 - 3
src/views/layout/components/AppMain.vue

@ -1,8 +1,7 @@
1 1
<template>
2 2
  <section class="app-main">
3
    <transition name="fade" mode="out-in">
3
    <transition name="fade-transform" mode="out-in">
4 4
      <router-view :key="key"></router-view>
5
      <!-- <router-view></router-view> -->
6 5
    </transition>
7 6
  </section>
8 7
</template>
@ -19,10 +18,11 @@ export default {
19 18
</script>
20 19
21 20
<style scoped>
21
22 22
.app-main {
23 23
  /*50 = navbar  */
24
  min-height: 100%;
25 24
  position: relative;
26 25
  overflow: hidden;
26
  min-height: 100%;
27 27
}
28 28
</style>

+ 11 - 2
src/views/layout/components/Navbar.vue

@ -1,8 +1,7 @@
1 1
<template>
2 2
  <div>
3 3
    <el-menu class="navbar" mode="horizontal">
4
      <!-- <hamburger  class="hamburger-container" :toggleClick="toggleSideBar" :isActive="sidebar.opened"></hamburger> -->
5
      <breadcrumb></breadcrumb>
4
      <div class="tag-breadcrumb">当前位置:</div><breadcrumb></breadcrumb>
6 5
    </el-menu>
7 6
  </div>
8 7
</template>
@ -43,6 +42,11 @@ export default {
43 42
  height: 50px;
44 43
  line-height: 50px;
45 44
  padding: 0 12px;
45
  position:fixed;
46
  top: 50px;
47
  left: 200px;
48
  right: 0;
49
  z-index: 100;
46 50
  border-radius: 0px !important;
47 51
  .hamburger-container {
48 52
    line-height: 58px;
@ -56,6 +60,11 @@ export default {
56 60
    top: 16px;
57 61
    color: red;
58 62
  }
63
  .tag-breadcrumb{
64
    float:left;
65
    font-size: 14px;
66
    line-height: 50px;
67
  }
59 68
}
60 69
.message-box{
61 70
  color: #303133;

+ 7 - 1
src/views/layout/components/Sidebar/SidebarItem.vue

@ -15,7 +15,13 @@
15 15
        </template>
16 16
17 17
        <template v-for="child in item.children" v-if="!child.hidden">
18
          <sidebar-item :is-nest="true" class="nest-menu" v-if="child.children&&child.children.length>0" :item="child" :key="child.path" :base-path="resolvePath(child.path)"></sidebar-item>
18
          <div v-if="child.children&&child.children.length>0">
19
            <sidebar-item v-if="!child.parentPath" :is-nest="true" class="nest-menu" :item="child" :key="child.path" :base-path="resolvePath(child.path)"></sidebar-item>
20
21
            <router-link v-else :to="resolvePath(child.path)">
22
              <sidebar-item :is-nest="true" class="nest-menu" :item="child" :key="child.path" :base-path="resolvePath(child.path)" ></sidebar-item>
23
            </router-link>
24
          </div>
19 25
20 26
          <router-link v-else :to="resolvePath(child.path)" :key="child.name" replace>
21 27
            <el-menu-item :index="resolvePath(child.path)">

+ 1 - 1
src/views/layout/components/Sidebar/index.vue

@ -4,7 +4,7 @@
4 4
      mode="vertical"
5 5
      :show-timeout="200"
6 6
      :default-active="$route.path"
7
      background-color="#304156"
7
      background-color="#20436b"
8 8
      text-color="#bfcbd9"
9 9
      active-text-color="#409EFF"
10 10
    >

+ 1 - 44
src/views/layout/components/TopNavbar.vue

@ -16,6 +16,7 @@
16 16
import { mapGetters } from 'vuex'
17 17
import { MessageBox } from 'element-ui'
18 18
import Cookies from 'js-cookie'
19
import '@/styles/variables.scss'
19 20
20 21
export default {
21 22
  data() {
@ -86,47 +87,3 @@ export default {
86 87
  }
87 88
}
88 89
</script>
89
90
<style rel="stylesheet/scss" lang="scss" scoped>
91
.topnavbar {
92
  position: fixed;
93
  font-size: 0px;
94
  top: 0;
95
  left: 0;
96
  right: 0;
97
  height: 50px;
98
  line-height: 50px;
99
  z-index:1002;
100
  border-radius: 0px !important;
101
  background-color: #2d3a4b;
102
  border-bottom: 1px solid #e6e6e6;
103
  .topnavbarBox {
104
    position: relative;
105
    margin: auto;
106
    box-sizing: border-box;
107
    padding: 0 10px;
108
    .logo-container {
109
      font-size: 22px;
110
      font-weight: bold;
111
      color: #efefef;
112
      display: inline-block;
113
      position: absolute;
114
      left:10px;
115
      overflow: hidden;
116
    }
117
    .name-box{
118
      display: inline-block;
119
      position: absolute;
120
      right: 20px;
121
      font-size:14px;
122
      overflow: hidden;
123
      color:#fff;
124
      .exit-btn {
125
        margin-left:30px;
126
        cursor: pointer;
127
      }
128
    }
129
  }
130
}
131
</style>
132

+ 289 - 0
src/views/platInfo/platUpdate.vue

@ -0,0 +1,289 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">修改平台信息</div>
5
    </div>
6
    <div class="content-container">
7
      <div class="main-info">
8
        <el-form :model="formObj" ref="formObj" :rules="rulesObj" label-width="80px" class="update-wrapper demo-ruleForm">
9
          <el-row :gutter="25">
10
            <el-col :span="14">
11
              <el-row :gutter="20" class="update-main">
12
                <el-col :span="24">
13
                  <el-form-item label="平台名称">邢台条件科技平台</el-form-item>
14
                </el-col>
15
                <el-col :span="24">
16
                  <el-form-item class="is-required" label="平台网址" prop="website">
17
                    <el-input v-model="formObj.website" placeholder="请填写平台网址" @fousc="" maxlength="50"></el-input>
18
                  </el-form-item>
19
                </el-col>
20
                <el-col :span="24">
21
                  <el-form-item class="is-required" label="管理机构" prop="">
22
                    <el-input v-model="formObj.website" placeholder="请填写管理机构名称" maxlength="50"></el-input>
23
                  </el-form-item>
24
                </el-col>
25
                <el-col :span="12">
26
                  <el-form-item class="is-required" label="所在城市" prop="">
27
                    <cityPicker></cityPicker>
28
                  </el-form-item>
29
                </el-col>
30
                <el-col :span="12">
31
                  <el-form-item label="平台邮编" prop="website">
32
                    <el-input v-model="formObj.website" type="number" placeholder="请填写管理机构名称" maxlength="20"></el-input>
33
                  </el-form-item>
34
                </el-col>
35
                <el-col :span="24">
36
                  <el-form-item class="is-required" label="详细地址" prop="address">
37
                    <el-input v-model="formObj.address" placeholder="请填写管理机构详细地址" maxlength="50"></el-input>
38
                  </el-form-item>
39
                </el-col>
40
                <el-col :span="12">
41
                  <el-form-item class="is-required" label="客服电话" prop="tel">
42
                    <el-input v-model="formObj.tel" placeholder="请填写客服电话" maxlength="50"></el-input>
43
                  </el-form-item>
44
                </el-col>
45
                <el-col :span="12">
46
                  <el-form-item class="is-required" label="客服邮箱" prop="mail">
47
                    <el-input v-model="formObj.mail" placeholder="请填写客服邮箱" maxlength="50"></el-input>
48
                  </el-form-item>
49
                </el-col>
50
                <el-col :span="24">
51
                  <el-form-item class="is-required" label="工作时间" prop="linkman">
52
                    <el-input v-model="formObj.linkman" placeholder="请填写客服工作时间" maxlength="50"></el-input>
53
                  </el-form-item>
54
                </el-col>
55
                <el-col :span="12">
56
                  <el-form-item class="is-required" label="联系人" prop="linkman">
57
                    <el-input v-model="formObj.linkman" placeholder="请填写平台联系人" maxlength="10"></el-input>
58
                  </el-form-item>
59
                </el-col>
60
                <el-col :span="12">
61
                  <el-form-item class="is-required" label="职位" prop="linkman">
62
                    <el-input v-model="formObj.linkman" placeholder="请填写联系人职位" maxlength="20"></el-input>
63
                  </el-form-item>
64
                </el-col>
65
                <el-col :span="24">
66
                  <el-form-item class="is-required" label="所在机构" prop="website">
67
                    <el-input v-model="formObj.website" placeholder="请填写联系人所在机构" maxlength="50"></el-input>
68
                  </el-form-item>
69
                </el-col>
70
                <el-col :span="12">
71
                  <el-form-item class="is-required" label="联系电话" prop="tel">
72
                    <el-input v-model="formObj.tel" placeholder="请填写联系电话" maxlength="50"></el-input>
73
                  </el-form-item>
74
                </el-col>
75
                <el-col :span="12">
76
                  <el-form-item label="联系邮箱" prop="mail">
77
                    <el-input v-model="formObj.mail" placeholder="请填写联系邮箱" maxlength="50"></el-input>
78
                  </el-form-item>
79
                </el-col>
80
                <!-- :labelW="80"
81
                  :widthselect="200"
82
                  :prov="province"
83
                  :city="city"
84
                  v-on:selectProv="getSelectProv($event)"
85
                  v-on:selectCity="getSelectCity($event)" -->
86
                <el-col :span="24">
87
                  <el-form-item class="is-required" label="平台简介" prop="desc">
88
                    <el-input type="textarea" :rows="8" v-model="formObj.desc" placeholder="请填写一个平台的简单介绍,让大家更好地了解平台" maxlength="5000"></el-input>
89
                  </el-form-item>
90
                </el-col>
91
                <el-col :span="24">
92
                  <el-form-item align="center">
93
                    <el-button type="primary" @click="submitForm('formObj')">保存</el-button>
94
                  </el-form-item>
95
                </el-col>
96
              </el-row>
97
            </el-col>
98
            <el-col :span="10">
99
              <div class="update-logo">
100
                <el-upload
101
                  class="avatar-uploader"
102
                  :action="uploadUrl"
103
                  :show-file-list="false"
104
                  ref="uploadLogo"
105
                  :on-success="handleAvatarSuccess"
106
                  :before-upload="beforeAvatarUpload">
107
                  <img v-if="imageUrl" :src="imageUrl" class="avatar">
108
                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
109
                </el-upload>
110
                <div class="update-tip">PNG/JPG/JPEG格式<br>大小2M以内</div>
111
              </div>
112
            </el-col>
113
            <el-col :span="24">
114
              <el-form-item align="right">
115
                <div>最后修改人:XXXX</div>
116
                <div>最后修改时间:2018/08/23 18:52:12</div>
117
              </el-form-item>
118
            </el-col>
119
          </el-row>
120
        </el-form>
121
      </div>
122
    </div>
123
  </div>
124
</template>
125
126
<script>
127
  import cityPicker from '@/components/CityPicker'
128
129
  export default {
130
    data() {
131
      return {
132
        plf_user: '',
133
        plf_name: '',
134
        imageUrl: '', // 临时地址
135
        imgName: '', // 图片的name
136
        uploadUrl: '',
137
        dynamicTags: [],
138
        isShowAdd: true,
139
        inputVisible: false,
140
        inputValue: '',
141
        province: '',
142
        city: '',
143
        formObj: {
144
          linkman: '',
145
          tel: '',
146
          mail: '',
147
          address: '',
148
          website: '',
149
          industry: '',
150
          desc: ''
151
        },
152
        rulesObj: {
153
        }
154
      }
155
    },
156
    computed: {
157
    },
158
    created() {
159
    },
160
    methods: {
161
      submitForm(formName) {
162
        this.$refs[formName].validate((valid) => {
163
          if (valid) {
164
            this.$refs.uploadLogo.submit() // 确认上传图片
165
            // if (this.province) {
166
            //   if (!this.city) {
167
            //     this.$alert('请您选择所在城市', '提示', {
168
            //       confirmButtonText: '确定',
169
            //       type: 'warning',
170
            //       center: true
171
            //     })
172
            //     return
173
            //   }
174
            // }
175
            // let paramsData = {
176
            //   'id': this.plf_user,
177
            //   'name': this.plf_name,
178
            //   'linkman': this.formObj.linkman,
179
            //   'logo': this.imgName,
180
            //   'linkphone': this.formObj.tel,
181
            //   'linkemail': this.formObj.mail,
182
            //   'province': this.province,
183
            //   'city': this.city,
184
            //   'addr': this.formObj.address,
185
            //   'url': this.formObj.website,
186
            //   'industry': this.formObj.industry,
187
            //   'descp': this.formObj.desc
188
            // }
189
            // this.$axios.post(httpUrl.hQuery.baseInfo.update, paramsData).then((res) => {
190
            //   this.$message({
191
            //     message: '平台信息修改成功!',
192
            //     type: 'success'
193
            //   });
194
            //   Cookies.set('plf_logo', this.imgName);
195
            //   this.$router.push({path: '/WorkHome'});
196
            //   this.reload();
197
            // }).catch(error => {
198
            //   console.log(error);
199
            // });
200
          } else {
201
            return false
202
          }
203
        })
204
      },
205
      // upload img
206
      handleAvatarSuccess(res, file) {
207
        this.imageUrl = URL.createObjectURL(file.raw)
208
        this.imgName = res.data[0].uri
209
      },
210
      beforeAvatarUpload(file) {
211
        const isJPG = file.type === 'image/jpeg'
212
        const isPNG = file.type === 'image/png'
213
        const isLt2M = file.size / 1024 / 1024 < 2
214
        if (!isJPG && !isPNG) {
215
          this.$message.error('请上传PNG/JPG/JPEG格式的图片')
216
        }
217
        if (!isLt2M) {
218
          this.$message.error('上传logo大小不能超过 2MB!')
219
        }
220
        return (!isJPG || !isPNG) && isLt2M
221
      }
222
      // upload img
223
    },
224
    components: {
225
      cityPicker
226
    }
227
  }
228
</script>
229
230
<style rel="stylesheet/scss" lang="scss">
231
  .main-info{
232
    /*min-width: 1100px;*/
233
    .update-logo{
234
      width: 280px;
235
      .avatar-uploader{
236
        .el-upload{
237
          /*center-items(280px,187px);*/
238
          border: 1px dashed #d9d9d9;
239
          cursor: pointer;
240
          position: relative;
241
          .el-upload:hover {
242
            border-color: #dadada;
243
          }
244
          .avatar-uploader-icon{
245
            font-size: 40px;
246
            color: #8c939d;
247
            width: 280px;
248
            height: 187px;
249
            line-height: 187px;
250
            text-align: center;
251
          }
252
        }
253
      }
254
      .update-tip{
255
        margin-top:15px;
256
        text-align:center;
257
        font-size:14px;
258
        /*color:$secondaryFont;*/
259
      }
260
    }
261
    .update-main{
262
      padding-left:25px;
263
      .update-title{
264
        font-size:30px;
265
        line-height:54px;
266
        margin-bottom:16px;
267
        padding-left:10px;
268
      }
269
270
      .el-tag + .el-tag{
271
        margin-left: 10px;
272
      }
273
      .button-new-tag{
274
        height: 32px;
275
        line-height: 30px;
276
        padding-top: 0;
277
        padding-bottom: 0;
278
      }
279
      .input-new-tag{
280
        width: 90px;
281
        margin-left: 10px;
282
        vertical-align: bottom;
283
      }
284
    }
285
    .shortW{
286
      width:300px;
287
    }
288
  }
289
</style>

+ 323 - 0
src/views/sysSetting/DemandIssue.vue

@ -0,0 +1,323 @@
1
<template>
2
  <div class="demandIssue content-wrapper">
3
    <el-form :model="ruleFormDem" :rules="rules" ref="ruleFormDem" class="form-main">
4
      <el-form-item label="需求主题" prop="demandTit">
5
        <el-input v-model="ruleFormDem.demandTit" placeholder="请用一句话概括您的需求"></el-input>
6
      </el-form-item>
7
      <el-form-item label="需求内容" prop="demandDesc">
8
        <el-input type="textarea" :rows="4" v-model="ruleFormDem.demandDesc" placeholder="请描述您的需求背景、具体问题、对专家的要求等等"></el-input>
9
      </el-form-item>
10
      <el-col :span="12">
11
        <CityPick ref="cityPick" :widthselect="148" :prov="ruleFormDem.province" :city="ruleFormDem.city" v-on:selectProv="getSelectProv($event)" v-on:selectCity="getSelectCity($event)"></CityPick>
12
        <!-- <el-form-item label="所在城市" prop="citys">
13
          <el-cascader
14
            :options="optionsCity"
15
            v-model="ruleFormDem.citys"
16
            class="shortW"
17
            placeholder="请选择所在的城市">
18
          </el-cascader>
19
        </el-form-item> -->
20
      </el-col>
21
      <el-col :span="12">
22
        <el-form-item label="需求有效期" prop="lastDate">
23
          <el-date-picker
24
            v-model="ruleFormDem.lastDate"
25
            type="date" class="shortW"
26
            format="yyyy-MM-dd"
27
            placeholder="请选择截止日期"
28
            :picker-options="pickerOptions0">
29
          </el-date-picker>
30
        </el-form-item>
31
      </el-col>
32
      <el-col :span="12">
33
        <el-form-item label="预计合作周期" prop="longTime">
34
          <el-select v-model="selectLongTime" placeholder="请选择预计合作周期" class="shortW">
35
            <el-option
36
              v-for="item in longTime"
37
              :key="item.value"
38
              :label="item.label"
39
              :value="item.value"
40
              @current-change="item.value">
41
            </el-option>
42
          </el-select>
43
        </el-form-item>
44
      </el-col>
45
      <el-col :span="12">
46
        <el-form-item label="费用预算" prop="costRange">
47
          <el-select v-model="selectCostRange" placeholder="请选择预算范围" class="shortW">
48
            <el-option
49
              v-for="item in costRange"
50
              :key="item.value"
51
              :label="item.label"
52
              :value="item.value">
53
            </el-option>
54
          </el-select>
55
        </el-form-item>
56
      </el-col>
57
      <el-col :span="24"><div class="form-line"></div></el-col>
58
      <el-col :span="12">
59
        <el-form-item label="联系人" prop="linkman">
60
          <el-input v-model="ruleFormDem.linkman" placeholder="请填写您的姓名" class="shortW"></el-input>
61
        </el-form-item>
62
      </el-col>
63
      <el-col :span="12">
64
        <el-form-item label="您所在的企业名称" prop="orgName">
65
          <el-input v-model="ruleFormDem.orgName" placeholder="建议填写与营业执照一致的企业名称" class="shortW"></el-input>
66
        </el-form-item>
67
      </el-col>
68
      <el-col :span="12">
69
        <el-form-item label="联系电话" prop="linkTel">
70
          <el-input v-model="ruleFormDem.linkTel" placeholder="请输入您的手机号码,可用于登录科袖网" class="shortW"></el-input>
71
        </el-form-item>
72
      </el-col>
73
      <el-col :span="12">
74
        <el-form-item label="图形验证码" prop="imgVerifyCode">
75
          <el-input v-model="ruleFormDem.imgVerifyCode" placeholder="请输入图形验证码" class="shortW code-btn">
76
          <img slot="append" :src="imgVcUrl" @click="changeImgVc" /></el-input>
77
        </el-form-item>
78
      </el-col>
79
      <el-col :span="12">
80
        <el-form-item label="短信验证码" prop="msgVerifyCode">
81
          <el-input v-model="ruleFormDem.msgVerifyCode" placeholder="请输入短信验证码" class="shortW">
82
            <el-button slot="append" :disabled="phoneCodeBol" @click="getPhoneCode">
83
              <span v-if="sendMsgDisabled">{{seconds + '秒后获取'}}</span>
84
              <span v-if="!sendMsgDisabled">获取验证码</span>
85
            </el-button>
86
          </el-input>
87
        </el-form-item>
88
      </el-col>
89
      <el-col :span="24" ><el-form-item style="height:20px"></el-form-item></el-col>
90
      <el-col :span="24" >
91
        <el-form-item style="text-align:center">
92
          <el-button type="primary" @click="submitForm('ruleFormDem')" style="padding: 12px 50px">立即发布</el-button><br/>
93
          <el-checkbox checked disabled>我已阅读并同意<a :href="kexiuLink + '/privacy.html'" target="_blank">《科袖用户协议》</a></el-checkbox>
94
        </el-form-item>
95
      </el-col>
96
    </el-form>
97
  </div>
98
</template>
99
100
<script type="text/ecmascript-6">
101
  // import {
102
  //   provinceAndCityData,
103
  //   CodeToText
104
  // } from 'element-china-area-data'; // TextToCode
105
106
  import Cookies from 'js-cookie';
107
  import httpUrl from '@/libs/http';
108
  import util from '@/libs/util';
109
110
  var validPhone = (rule, value, callback) => {
111
    const reg = /^1[3|4|5|7|8][0-9]\d{8}$/;
112
    if (!value) {
113
      callback(new Error('请输入你的手机号码'));
114
    } else if (!reg.test(value)) {
115
      callback(new Error('请输入正确的手机号码'));
116
    } else {
117
      callback();
118
    };
119
  };
120
121
  export default {
122
    data() {
123
      return {
124
        pickerOptions0: {
125
          disabledDate(time) {
126
            return time.getTime() < Date.now();
127
          }
128
        },
129
        kexiuLink: util.ekexiuUrl,
130
        platSource: '',
131
        phoneCodeBol: false,
132
        sendMsgDisabled: false,
133
        seconds: 60,
134
        phoneResBack: '',
135
        imgVcUrl: httpUrl.kxQurey.sign.imgVC,
136
        // optionsCity: provinceAndCityData,
137
        selectCostRange: '',
138
        selectLongTime: '',
139
        longTime: util.Dictionary.durationTime,
140
        costRange: util.Dictionary.costRange,
141
        ruleFormDem: {
142
          demandTit: '',
143
          demandDesc: '',
144
          province: '',
145
          city: '',
146
          lastDate: '',
147
          linkman: '',
148
          orgName: '',
149
          linkTel: '',
150
          imgVerifyCode: '',
151
          msgVerifyCode: ''
152
        },
153
        rules: {
154
          demandTit: [
155
            { required: true, message: '请填写需求主题', trigger: 'blur' }
156
          ],
157
          demandDesc: [
158
            { required: true, message: '请填写需求内容', trigger: 'blur' },
159
            { max: 1000, message: '不得超过1000个字', trigger: 'blur' }
160
          ],
161
          province: [
162
            { required: true, message: '请填写所在省', trigger: 'blur' }
163
          ],
164
          city: [
165
            { required: true, message: '请填写所在城市', trigger: 'blur' }
166
          ],
167
          lastDate: [
168
            { required: true, message: '请选择截止日期', trigger: 'blur' }
169
          ],
170
          linkman: [
171
            { required: true, message: '请填写您的姓名', trigger: 'blur' },
172
            { max: 10, message: '不得超过10个字', trigger: 'blur' }
173
          ],
174
          orgName: [
175
            { required: true, message: '请填写您所在的企业名称', trigger: 'blur' },
176
            { max: 50, message: '不得超过50个字', trigger: 'blur' }
177
          ],
178
          linkTel: [
179
            { required: true, validator: validPhone, trigger: 'blur' }
180
          ],
181
          imgVerifyCode: [
182
            { required: true, message: '请输入图形验证码', trigger: 'blur' }
183
          ],
184
          msgVerifyCode: [
185
            { required: true, message: '请输入短信验证码', trigger: 'blur' }
186
          ]
187
        }
188
      };
189
    },
190
    created() {
191
      this.platSource = Cookies.get('platSource');
192
    },
193
    methods: {
194
      getSelectProv(prov) {
195
        this.ruleFormDem.province = prov;
196
      },
197
      getSelectCity(city) {
198
        this.ruleFormDem.city = city;
199
      },
200
      getPhoneCode() {
201
        if (this.ruleFormDem.linkTel && this.ruleFormDem.imgVerifyCode) {
202
          this.$axios.get(httpUrl.kxQurey.sign.msgVC, {
203
            params: {
204
              phone: this.ruleFormDem.linkTel,
205
              vcode: this.ruleFormDem.imgVerifyCode
206
            }
207
          }).then((res) => {
208
            if (res.success) {
209
              console.log(res);
210
              this.phoneResBack = res.data;
211
              this.clickMsgVc();
212
            } else {
213
              if (res.code === 20001) {
214
                this.$message.error('图形验证码错误');
215
                this.changeImgVc();
216
              };
217
            };
218
          });
219
        } else {
220
          this.$message({
221
            message: '请输入手机号和图形验证码',
222
            type: 'warning'
223
          });
224
        }
225
      },
226
      clickMsgVc() {
227
        let me = this;
228
        me.sendMsgDisabled = true;
229
        me.phoneCodeBol = true;
230
        let interval = window.setInterval(function() {
231
         if ((me.seconds--) <= 0) {
232
          me.seconds = 60;
233
          me.sendMsgDisabled = false;
234
          me.phoneCodeBol = false;
235
          window.clearInterval(interval);
236
         }
237
        }, 1000);
238
      },
239
      changeImgVc() {
240
        this.imgVcUrl = httpUrl.kxQurey.sign.imgVC + '?' + new Date().getTime();
241
      },
242
      resetForm(formName) {
243
        this.$refs.cityPick.resetProvCity();
244
        this.selectCostRange = '';
245
        this.selectLongTime = '';
246
        this.$refs[formName].resetFields();
247
      },
248
      submitForm(formName) {
249
        this.$refs[formName].validate((valid) => {
250
          if (valid) {
251
            let paramsData = {
252
              'title': this.ruleFormDem.demandTit,
253
              'descp': this.ruleFormDem.demandDesc,
254
              'province': this.ruleFormDem.province,
255
              'city': this.ruleFormDem.city,
256
              'invalidDay': util.dateFormatter(this.ruleFormDem.lastDate, false, true),
257
              'cost': this.selectCostRange,
258
              'duration': this.selectLongTime,
259
              'name': this.ruleFormDem.linkman,
260
              'orgName': this.ruleFormDem.orgName,
261
              'contactNum': this.ruleFormDem.linkTel,
262
              'vc': this.ruleFormDem.msgVerifyCode,
263
              'state': this.phoneResBack,
264
              'source': this.platSource
265
            };
266
            console.log(paramsData);
267
            this.$axios.post(httpUrl.hQuery.demand.add, paramsData).then((res) => {
268
              if (res.success) {
269
                this.$alert('我们已收到您的需求,马上为您对接合适的专家和专业机构,您可以登录科袖网与对方做进一步沟通。', '需求发布成功!', {
270
                  confirmButtonText: '进入科袖网,发现更多服务和资源',
271
                  type: 'success',
272
                  center: true,
273
                  cancelButtonText: '取消',
274
                  callback: action => {
275
                    if (action === 'confirm') {
276
                      window.open(util.ekexiuUrl, '科袖网首页');
277
                    };
278
                  }
279
                });
280
                this.resetForm(formName);
281
                this.$emit('dialogChanged', false);
282
              } else {
283
                this.$message({
284
                  message: '需求发布失败,请重新发布!',
285
                  type: 'warning'
286
                });
287
              };
288
              console.log(res);
289
            }).catch(error => {
290
              console.log(error);
291
            });
292
          } else {
293
            console.log('error submit!!');
294
            return false;
295
          }
296
        });
297
      }
298
    }
299
  };
300
</script>
301
302
<style lang="stylus" rel="stylesheet/stylus">
303
.demandIssue
304
  padding-top:10px
305
  .form-main
306
    width:100%
307
    .form-line
308
      border-top:1px dashed #ccc
309
      margin-bottom:20px
310
  .shortW
311
    width:300px
312
  .code-btn
313
    .el-input-group__append
314
      padding:0
315
      overflow:hidden
316
      img
317
        width:100px
318
        height:38px
319
        cursor: pointer
320
  .el-checkbox__label
321
    a
322
      color:#c0c4cc
323
</style>

+ 226 - 0
src/views/sysSetting/adminUser.vue

@ -0,0 +1,226 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">平台后台用户管理列表</div>
5
      <div class="contian-operate">
6
        <el-button type="primary" @click="handleADD">添加</el-button>
7
      </div>
8
    </div>
9
    <div class="content-container">
10
      <div class="contain-select">
11
        <span>用户分类:</span>
12
        <el-select
13
          v-model="selectMode"
14
          @change="selectChange">
15
          <el-option label="正常账号" value="1" selected></el-option>
16
          <el-option label="停用账号" value="2"></el-option>
17
        </el-select>
18
      </div>
19
      <el-table
20
        :data="tableData"
21
        height="630"
22
        border>
23
        <el-table-column
24
          v-for="item in tableItem"
25
          :key="item.index"
26
          :prop="item.prop ? item.prop : ''"
27
          :label="item.tit ? item.tit : ''"
28
          :width="item.width ? item.width : ''"
29
          align="center">
30
          <template slot-scope="scope">
31
            <div v-if="scope.row[item.prop]">
32
              {{scope.row[item.prop]}}
33
            </div>
34
            <div v-if="item.operate && typeof scope.row === 'object'">
35
              <div class="normal" v-if="scope.row.active">
36
                <el-button
37
                  size="mini"
38
                  type="primary"
39
                  @click="handleEdit(scope.row)">修改</el-button>
40
                <el-button
41
                  size="mini"
42
                  type="primary"
43
                  @click="handleResetpw(scope.row)">重置密码</el-button>
44
                <el-button
45
                  size="mini"
46
                  type="primary"
47
                  @click="handleRight(scope.row)">分配权限</el-button>
48
                <el-button
49
                  size="mini"
50
                  type="danger"
51
                  @click="handleDelete(scope.$index, scope.row)">停用</el-button>
52
              </div>
53
              <div class="forbidden" v-else>
54
                <el-button
55
                  size="mini"
56
                  type="primary"
57
                  @click="handleEdit(scope.$index, scope.row)">恢复</el-button>
58
              </div>
59
            </div>
60
          </template>
61
        </el-table-column>
62
      </el-table>
63
      <div class="pagination-container">
64
        <el-pagination
65
          background
66
          @current-change="handleCurrentChange"
67
          :current-page.sync="pageNo"
68
          :page-size="pageSize"
69
          layout="prev, pager, next, jumper"
70
          :total="total">
71
        </el-pagination>
72
      </div>
73
    </div>
74
    <editUser ref="userInfoDialog"></editUser>
75
  </div>
76
</template>
77
78
<script>
79
  import request from '@/utils/request'
80
  import { parseTime } from '@/utils'
81
  import comTable from '@/utils/comTable'
82
  import {
83
    pageQueryUser,
84
    // addUser,
85
    resetPw
86
    // updateUser,
87
    // updatePermission,
88
    // banUser
89
  } from '@/api/sysSetting'
90
91
  import editUser from './editUser'
92
  export default {
93
    data() {
94
      return {
95
        searchText: '',
96
        selectMode: '1',
97
        pageSize: 10,
98
        pageNo: 1,
99
        total: 0,
100
        tableData: [],
101
        tableItem: [
102
          {
103
            prop: 'account',
104
            tit: '账号'
105
          },
106
          {
107
            prop: 'id',
108
            tit: '用户名'
109
          },
110
          {
111
            prop: 'job',
112
            tit: '职位',
113
            width: '160'
114
          },
115
          {
116
            prop: 'comp',
117
            tit: '所在部门',
118
            width: '160'
119
          },
120
          {
121
            prop: 'dep',
122
            tit: '所在机构'
123
          },
124
          {
125
            prop: 'phone',
126
            tit: '联系电话',
127
            width: '160'
128
          },
129
          {
130
            prop: 'email',
131
            tit: '联系邮箱',
132
            width: '160'
133
          },
134
          {
135
            prop: 'createTime',
136
            tit: '创建时间',
137
            width: '160'
138
          },
139
          {
140
            operate: true,
141
            width: '200'
142
          }
143
        ]
144
      }
145
    },
146
    components: {
147
      editUser
148
    },
149
    created() {
150
      this.pageQueryUser()
151
    },
152
    methods: {
153
      pageQueryUser() {
154
        var that = this
155
        request.get(pageQueryUser, {
156
          active: that.selectMode,
157
          pageSize: that.pageSize,
158
          pageNo: that.pageNo
159
        }, function(res) {
160
          if (res.data.success && res.data.data) {
161
            const obj = res.data.data
162
            for (let i = 0; i < obj.length; ++i) {
163
              if (obj[i].createTime) {
164
                obj[i].createTime = parseTime(obj[i].createTime)
165
              }
166
            }
167
            that.total = res.data.total
168
            that.tableData = obj
169
          }
170
        })
171
        comTable.gapFilling(that.tableData)
172
      },
173
      handleADD() {
174
        // this.$refs.BInfoDialog02.queryServerList()
175
        this.$refs.userInfoDialog.userDialogVisible = true
176
      },
177
      handleCurrentChange(val) {
178
        this.pageNo = val
179
        this.pageQueryUser()
180
      },
181
      selectChange(val) {
182
        this.selectMode = val
183
        this.pageQueryUser()
184
      },
185
      handleEdit(row) {
186
        var that = this
187
        request.get(resetPw, {
188
          id: row.id
189
        }, function(res) {
190
          that.$message({
191
            type: 'success',
192
            message: '删除成功!'
193
          })
194
        })
195
      },
196
      handleResetpw(row) {
197
        var that = this
198
        that.$confirm(`确定重置用户${row.name}的密码`, '提示', {
199
          confirmButtonText: '确定',
200
          cancelButtonText: '取消',
201
          type: 'warning',
202
          center: true
203
        }).then(() => {
204
          request.get(resetPw, {
205
            id: row.id
206
          }, function(res) {
207
            that.$message({
208
              type: 'success',
209
              message: '该用户密码重置成功!'
210
            })
211
          })
212
        })
213
      },
214
      handleRight(row) {
215
        // var that = this
216
        // request.get(updatePermission + row.id, {
217
        // }, function(res) {
218
        //   that.$message({
219
        //     type: 'success',
220
        //     message: '删除成功!'
221
        //   })
222
        // })
223
      }
224
    }
225
  }
226
</script>

+ 208 - 0
src/views/sysSetting/editUser.vue

@ -0,0 +1,208 @@
1
<template>
2
  <el-dialog title="添加用户信息" :visible.sync="userDialogVisible">
3
    <el-form
4
      :model="userForm"
5
      :rules="userRules"
6
      ref="userForm"
7
      class="form-main"
8
      label-width="80px">
9
      <el-row :gutter="20">
10
        <el-col :span="12">
11
          <!-- <el-form-item label="账号" v-if="">
12
            <span>{{userForm.account}}</span>
13
          </el-form-item> -->
14
          <el-form-item class="is-required" label="账号" prop="account">
15
            <el-input v-model="userForm.account" placeholder="请填写用户账号" maxlength="20"></el-input>
16
          </el-form-item>
17
        </el-col>
18
        <el-col :span="12">
19
          <el-form-item class="is-required" label="用户名" prop="name">
20
            <el-input v-model="userForm.name" placeholder="请填写用户名"></el-input>
21
          </el-form-item>
22
        </el-col>
23
        <el-col :span="12">
24
          <el-form-item class="is-required" label="联系电话" prop="tel">
25
            <el-input v-model="userForm.tel" placeholder="请填写用户联系电话" maxlength="20"></el-input>
26
          </el-form-item>
27
        </el-col>
28
        <el-col :span="12">
29
          <el-form-item label="联系邮箱" prop="mail">
30
            <el-input v-model="userForm.mail" placeholder="请填写用户联系邮箱" maxlength="50"></el-input>
31
          </el-form-item>
32
        </el-col>
33
        <el-col :span="12">
34
          <el-form-item label="职位" prop="position">
35
            <el-input v-model="userForm.position" placeholder="请填写用户职位" maxlength="20"></el-input>
36
          </el-form-item>
37
        </el-col>
38
        <el-col :span="12">
39
          <el-form-item label="所在部门" prop="department">
40
            <el-input v-model="userForm.department" placeholder="请填写用户所在部门" maxlength="20"></el-input>
41
          </el-form-item>
42
        </el-col>
43
        <el-col :span="24">
44
          <el-form-item class="is-required" label="所在机构" prop="org">
45
            <el-input v-model="userForm.org" placeholder="请填写联系人所在机构" maxlength="50"></el-input>
46
          </el-form-item>
47
        </el-col>
48
        <el-col :span="24"><div class="form-line"></div></el-col>
49
        <el-col :span="24">
50
          <el-card shadow="never">
51
            <div class="card-title" slot="header">
52
              <span>分配权限</span>
53
            </div>
54
            <el-checkbox-group v-model="userForm.module">
55
              <el-checkbox v-for="item in moduleOption" :label="item.name" :key="item.index">{{item.name}}</el-checkbox>
56
            </el-checkbox-group>
57
          </el-card>
58
        </el-col>
59
        <el-col :span="24" class="el-btn-col">
60
          <div class="el-btn-col-box">
61
            <el-button type="primary" @click="submitForm('userForm')">保存</el-button>
62
          </div>
63
        </el-col>
64
        <el-col :span="24">
65
          <el-form-item align="right">
66
            <span>创建时间:2018/08/23 18:52:12</span>
67
          </el-form-item>
68
        </el-col>
69
      </el-row>
70
    </el-form>
71
  </el-dialog>
72
</template>
73
74
<script>
75
  import { checkEmailV } from '@/utils/validator'
76
77
  export default {
78
    data() {
79
      return {
80
        userDialogVisible: false,
81
        platSource: '',
82
        moduleOption: [
83
          {
84
            id: 0,
85
            name: '内容发布'
86
          },
87
          {
88
            id: 0,
89
            name: '内容发布'
90
          },
91
          {
92
            id: 0,
93
            name: '内容发布'
94
          },
95
          {
96
            id: 0,
97
            name: '内容发布'
98
          }
99
        ],
100
        userForm: {
101
          account: '',
102
          name: '',
103
          tel: '',
104
          mail: '',
105
          position: '',
106
          department: '',
107
          org: '',
108
          module: ''
109
        },
110
        userRules: {
111
          mail: [{ validator: checkEmailV, trigger: 'blur' }]
112
        }
113
      }
114
    },
115
    created() {
116
      // this.platSource = Cookies.get('platSource');
117
    },
118
    methods: {
119
      resetForm(formName) {
120
        this.$refs[formName].resetFields()
121
      },
122
      submitForm(formName) {
123
        this.$refs[formName].validate((valid) => {
124
          if (valid) {
125
            // let paramsData = {
126
            //   'title': this.ruleFormDem.demandTit,
127
            //   'descp': this.ruleFormDem.demandDesc,
128
            //   'province': this.ruleFormDem.province,
129
            //   'city': this.ruleFormDem.city,
130
            //   'invalidDay': util.dateFormatter(this.ruleFormDem.lastDate, false, true),
131
            //   'cost': this.selectCostRange,
132
            //   'duration': this.selectLongTime,
133
            //   'name': this.ruleFormDem.linkman,
134
            //   'orgName': this.ruleFormDem.orgName,
135
            //   'contactNum': this.ruleFormDem.linkTel,
136
            //   'vc': this.ruleFormDem.msgVerifyCode,
137
            //   'state': this.phoneResBack,
138
            //   'source': this.platSource
139
            // };
140
            // console.log(paramsData);
141
            // this.$axios.post(httpUrl.hQuery.demand.add, paramsData).then((res) => {
142
            //   if (res.success) {
143
            //     this.$alert('我们已收到您的需求,马上为您对接合适的专家和专业机构,您可以登录科袖网与对方做进一步沟通。', '需求发布成功!', {
144
            //       confirmButtonText: '进入科袖网,发现更多服务和资源',
145
            //       type: 'success',
146
            //       center: true,
147
            //       cancelButtonText: '取消',
148
            //       callback: action => {
149
            //         if (action === 'confirm') {
150
            //           window.open(util.ekexiuUrl, '科袖网首页');
151
            //         };
152
            //       }
153
            //     });
154
            //     this.resetForm(formName);
155
            //     this.$emit('dialogChanged', false);
156
            //   } else {
157
            //     this.$message({
158
            //       message: '需求发布失败,请重新发布!',
159
            //       type: 'warning'
160
            //     });
161
            //   };
162
            //   console.log(res);
163
            // }).catch(error => {
164
            //   console.log(error);
165
            // });
166
          } else {
167
            return false
168
          }
169
        })
170
      }
171
    }
172
  }
173
</script>
174
175
<style rel="stylesheet/scss" lang="scss">
176
  .form-main{
177
    width:100%;
178
    .form-line{
179
      border-top:1px dashed #ccc;
180
      margin-bottom:20px;
181
    }
182
  }
183
  .shortW{
184
    width:300px;
185
  }
186
  .card-title{
187
    font-size: 20px;
188
    font-weight: bold;
189
  }
190
  .el-checkbox-group{
191
    .el-checkbox{
192
      font-size: 16px;
193
      margin: 10px 60px;
194
      .el-checkbox__inner{
195
        width: 16px;
196
        height: 16px;
197
      }
198
      .el-checkbox__inner::after{
199
        left:5px;
200
        top:2px;
201
      }
202
      .el-checkbox__label{
203
        line-height:24px;
204
        font-size:16px;
205
      }
206
    }
207
  }
208
</style>

+ 86 - 0
src/views/userInfo/baseInfo.vue

@ -0,0 +1,86 @@
1
<template>
2
  <el-dialog title="用户信息" :visible.sync="userDialogVisible">
3
    <el-form
4
      ref="userForm"
5
      class="form-main"
6
      label-width="80px">
7
      <el-row :gutter="20">
8
        <el-col :span="16">
9
          <el-col :span="12">
10
            <el-form-item label="用户名">{{userForm.name}}</el-form-item>
11
          </el-col>
12
          <el-col :span="12">
13
            <el-form-item label="账号状态">正常用户</el-form-item>
14
          </el-col>
15
          <el-col :span="12">
16
            <el-form-item label="手机账号">{{userForm.account}}</el-form-item>
17
          </el-col>
18
          <el-col :span="12">
19
            <el-form-item label="真实姓名">{{userForm.name}}</el-form-item>
20
          </el-col>
21
          <el-col :span="12">
22
            <el-form-item label="性别">{{userForm.sex}}</el-form-item>
23
          </el-col>
24
          <el-col :span="12">
25
            <el-form-item label="职位">{{userForm.position}}</el-form-item>
26
          </el-col>
27
          <el-col :span="24">
28
            <el-form-item label="所在企业">{{userForm.company}}</el-form-item>
29
          </el-col>
30
          <el-col :span="12">
31
            <el-form-item label="联系电话">{{userForm.tel}}</el-form-item>
32
          </el-col>
33
          <el-col :span="12">
34
            <el-form-item label="联系邮箱">{{userForm.mail}}</el-form-item>
35
          </el-col>
36
          <el-col :span="24">
37
            <el-form-item label="所在城市">{{userForm.city}}</el-form-item>
38
          </el-col>
39
        </el-col>
40
        <el-col :span="8">
41
          <div class="headImg" :style="{backgroundImage:'url('+ userForm.img +')'}"></div>
42
        </el-col>
43
        <el-col :span="24" class="el-btn-col">
44
          <div class="el-btn-col-box">
45
            <el-button type="primary">确定</el-button>
46
          </div>
47
        </el-col>
48
        <el-col :span="24">
49
          <el-form-item align="right">
50
            <span>创建时间:2018/08/23 18:52:12</span>
51
          </el-form-item>
52
        </el-col>
53
      </el-row>
54
    </el-form>
55
  </el-dialog>
56
</template>
57
58
<script>
59
  export default {
60
    data() {
61
      return {
62
        userDialogVisible: false,
63
        userForm: ''
64
      }
65
    },
66
    created() {
67
    },
68
    methods: {
69
    }
70
  }
71
</script>
72
73
<style rel="stylesheet/scss" lang="scss">
74
  .form-main{
75
    width:100%;
76
  }
77
  .shortW{
78
    width:300px;
79
  }
80
  .headImg{
81
    width: 60px;
82
    height: 60px;
83
    background-size: cover;
84
  }
85
86
</style>

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

@ -0,0 +1,89 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">黑名单用户</div>
5
      <div class="contain-search">
6
        <el-input placeholder="搜索用户名/手机账号" v-model="searchText" class="input-with-select">
7
          <el-button slot="append" icon="el-icon-search"></el-button>
8
        </el-input>
9
      </div>
10
    </div>
11
    <div class="content-container">
12
      <complex-table :tableData="tableData" :tableItem="tableItem"></complex-table>
13
    </div>
14
  </div>
15
</template>
16
17
<script>
18
import complexTable from '@/components/complexTable'
19
export default {
20
  data() {
21
    return {
22
      searchText: '',
23
      selectMode: '',
24
      tableData: [
25
        {
26
          date: '2018/08/25 16:32',
27
          name: '关于征集企业技术创新需求的通知',
28
          class: '通知公告',
29
          owner: '张贝贝',
30
          num: '4552'
31
        }, {
32
          date: '2018/08/25 16:32',
33
          name: '关于征集企业技术创新需求的通知',
34
          class: '通知公告',
35
          owner: '张贝贝',
36
          num: '4552'
37
        }, {
38
          date: '2018/08/25 16:32',
39
          name: '关于征集企业技术创新需求的通知',
40
          class: '通知公告',
41
          owner: '张贝贝',
42
          num: '4552'
43
        }, {
44
          date: '2018/08/25 16:32',
45
          name: '关于征集企业技术创新需求的通知',
46
          class: '通知公告',
47
          owner: '张贝贝',
48
          num: '4552'
49
        }
50
      ],
51
      tableItem: [
52
        {
53
          prop: 'name',
54
          tit: '标题'
55
        },
56
        {
57
          prop: 'class',
58
          tit: '栏目分类',
59
          width: '160'
60
        },
61
        {
62
          prop: 'owner',
63
          tit: '发布人',
64
          width: '160'
65
        },
66
        {
67
          prop: 'date',
68
          tit: '发布时间',
69
          width: '160'
70
        },
71
        {
72
          prop: 'num',
73
          tit: '浏览数量',
74
          width: '160'
75
        },
76
        {
77
          operate: 'edit',
78
          width: '200'
79
        }
80
      ]
81
    }
82
  },
83
  components: {
84
    complexTable
85
  },
86
  methods: {
87
  }
88
}
89
</script>

+ 111 - 0
src/views/userInfo/pullBlack.vue

@ -0,0 +1,111 @@
1
<template>
2
  <el-dialog title="拉黑用户" :visible.sync="userDialogVisible">
3
    <el-form
4
      :model="userForm"
5
      ref="userForm"
6
      class="form-main"
7
      label-width="80px">
8
      <el-row :gutter="20">
9
        <el-col :span="12">
10
          <el-form-item label="用户名">{{userForm.name}}</el-form-item>
11
        </el-col>
12
        <el-col :span="12">
13
          <el-form-item label="真实姓名">{{userForm.name}}</el-form-item>
14
        </el-col>
15
        <el-col :span="12">
16
          <el-form-item label="手机账号">{{userForm.account}}</el-form-item>
17
        </el-col>
18
        <el-col :span="12">
19
          <el-form-item label="性别">{{userForm.sex}}</el-form-item>
20
        </el-col>
21
        <el-col :span="24">
22
          <el-form-item label="所在机构">{{userForm.position}}</el-form-item>
23
        </el-col>
24
        <el-col :span="24">
25
          <el-form-item class="is-required" label="拉黑理由" prop="desc">
26
            <el-input type="textarea" :rows="8" v-model="userForm.desc" placeholder="请用一句话概括该用户拉黑理由" maxlength="100"></el-input>
27
          </el-form-item>
28
        </el-col>
29
        <el-col :span="24" class="el-btn-col">
30
          <div class="el-btn-col-box">
31
            <el-button type="primary">确定</el-button>
32
          </div>
33
        </el-col>
34
        <el-col :span="24">
35
          <el-form-item align="right">
36
            <span>创建时间:2018/08/23 18:52:12</span>
37
          </el-form-item>
38
        </el-col>
39
      </el-row>
40
    </el-form>
41
  </el-dialog>
42
</template>
43
44
<script>
45
  export default {
46
    data() {
47
      return {
48
        userDialogVisible: false,
49
        userForm: {
50
          account: '',
51
          name: '',
52
          tel: '',
53
          mail: '',
54
          position: '',
55
          department: '',
56
          org: '',
57
          module: ''
58
        }
59
      }
60
    },
61
    created() {
62
63
    },
64
    methods: {
65
      submitForm(formName) {
66
        // this.$refs[formName].validate((valid) => {
67
        //   if (valid) {
68
        //   } else {
69
        //     return false
70
        //   }
71
        // })
72
      }
73
    }
74
  }
75
</script>
76
77
<style rel="stylesheet/scss" lang="scss">
78
  .form-main{
79
    width:100%;
80
    .form-line{
81
      border-top:1px dashed #ccc;
82
      margin-bottom:20px;
83
    }
84
  }
85
  .shortW{
86
    width:300px;
87
  }
88
  .card-title{
89
    font-size: 20px;
90
    font-weight: bold;
91
  }
92
  .el-checkbox-group{
93
    .el-checkbox{
94
      font-size: 16px;
95
      margin: 10px 60px;
96
      .el-checkbox__inner{
97
        width: 16px;
98
        height: 16px;
99
      }
100
      .el-checkbox__inner::after{
101
        left:5px;
102
        top:2px;
103
      }
104
      .el-checkbox__label{
105
        line-height:24px;
106
        font-size:16px;
107
      }
108
    }
109
  }
110
    
111
</style>

+ 103 - 0
src/views/userInfo/usingList.vue

@ -0,0 +1,103 @@
1
<template>
2
  <div class="app-container">
3
    <div class="box-container">
4
      <div class="contain-title">正常用户</div>
5
      <div class="contain-search">
6
        <el-input placeholder="搜索用户名/手机账号" v-model="searchText" class="input-with-select">
7
          <el-button slot="append" icon="el-icon-search"></el-button>
8
        </el-input>
9
      </div>
10
    </div>
11
    <div class="content-container">
12
      <complex-table :tableData="tableData" :tableItem="tableItem"></complex-table>
13
      <span @click="queryInfo">用户信息</span>
14
      <span @click="pullBlackFun">拉黑</span>
15
    </div>
16
    <baseInfo ref="baseInfo"></baseInfo>
17
    <pullBlack ref="pullBlack"></pullBlack>
18
  </div>
19
</template>
20
21
<script>
22
import complexTable from '@/components/complexTable'
23
import baseInfo from './baseInfo'
24
import pullBlack from './pullBlack'
25
export default {
26
  data() {
27
    return {
28
      searchText: '',
29
      selectMode: '',
30
      tableData: [
31
        {
32
          date: '2018/08/25 16:32',
33
          name: '关于征集企业技术创新需求的通知',
34
          class: '通知公告',
35
          owner: '张贝贝',
36
          num: '4552'
37
        }, {
38
          date: '2018/08/25 16:32',
39
          name: '关于征集企业技术创新需求的通知',
40
          class: '通知公告',
41
          owner: '张贝贝',
42
          num: '4552'
43
        }, {
44
          date: '2018/08/25 16:32',
45
          name: '关于征集企业技术创新需求的通知',
46
          class: '通知公告',
47
          owner: '张贝贝',
48
          num: '4552'
49
        }, {
50
          date: '2018/08/25 16:32',
51
          name: '关于征集企业技术创新需求的通知',
52
          class: '通知公告',
53
          owner: '张贝贝',
54
          num: '4552'
55
        }
56
      ],
57
      tableItem: [
58
        {
59
          prop: 'name',
60
          tit: '标题'
61
        },
62
        {
63
          prop: 'class',
64
          tit: '栏目分类',
65
          width: '160'
66
        },
67
        {
68
          prop: 'owner',
69
          tit: '发布人',
70
          width: '160'
71
        },
72
        {
73
          prop: 'date',
74
          tit: '发布时间',
75
          width: '160'
76
        },
77
        {
78
          prop: 'num',
79
          tit: '浏览数量',
80
          width: '160'
81
        },
82
        {
83
          operate: 'edit',
84
          width: '200'
85
        }
86
      ]
87
    }
88
  },
89
  components: {
90
    complexTable,
91
    baseInfo,
92
    pullBlack
93
  },
94
  methods: {
95
    queryInfo() {
96
      this.$refs.baseInfo.userDialogVisible = true
97
    },
98
    pullBlackFun() {
99
      this.$refs.pullBlack.userDialogVisible = true
100
    }
101
  }
102
}
103
</script>