Browse Source

Merge branch 'master' of http://121.42.53.174:3000/luyanan/plat-admin

lipengtao 5 years ago
parent
commit
627a397f25

+ 1 - 1
config/index.js

@ -30,7 +30,7 @@ module.exports = {
30 30
     */
31 31
32 32
    // https://webpack.js.org/configuration/devtool/#development
33
    devtool: 'cheap-module-eval-source-map',
33
    devtool: 'source-map',
34 34
35 35
    // If you have problems debugging vue-files in devtools,
36 36
    // set this to false - it *may* help

+ 4 - 4
config/prod.env.js

@ -4,8 +4,8 @@ module.exports = {
4 4
  ENV_CONFIG:'"prod"',
5 5
  PLAT_ID: '"F5DEA8EDB12E421A9FC4B701BB6176A6"',
6 6
  BASE_API: '""',
7
  XT_API: '"http://www.xttjpt.cn"',
8
  KX_API: '"http://www.ekexiu.com"'
9
  // XT_API: '"http://192.168.3.233:84"',
10
  // KX_API: '"http://192.168.3.233:81"'
7
  // XT_API: '"http://www.xttjpt.cn"',
8
  // KX_API: '"http://www.ekexiu.com"'
9
  XT_API: '"http://192.168.3.233:84"',
10
  KX_API: '"http://192.168.3.233:81"'
11 11
}

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

@ -7,7 +7,7 @@
7 7
        :width="item.width ? item.width : ''" align="center" :className="item.active">
8 8
        <template slot-scope="scope">
9 9
          <el-button v-if="item.chart && typeof scope.row === 'object'" type="text" style="color:#606266" @click="$emit('showChart', scope.row.id)"><svg-icon icon-class="chart" /></el-button>
10
          <div v-if="scope.row[item.prop]">
10
          <div>
11 11
            <el-button type="text" v-if="item.active"><a :href="parentChangedLink(scope.row.id)" target="_blank">{{scope.row[item.prop]}}</a></el-button>
12 12
            <div v-else> {{scope.row[item.prop]}}</div>
13 13
          </div>

+ 6 - 2
src/utils/CrossDomain.js

@ -43,7 +43,9 @@ const cacheModule = {
43 43
      } else {
44 44
        this.catchAgency[id].img = defaultSet.img.org
45 45
      }
46
      this.catchAgency[id].orgType = orgType[this.catchAgency[id].orgType]
46
      if (this.catchAgency[id].orgType) {
47
        this.catchAgency[id].orgType = orgType[this.catchAgency[id].orgType]
48
      }
47 49
      callback(this.catchAgency[id])
48 50
    } else {
49 51
      request.get(agencyUrl + id, {}, response => {
@ -54,7 +56,9 @@ const cacheModule = {
54 56
          } else {
55 57
            info.img = defaultSet.img.org
56 58
          }
57
          info.orgType = orgType[info.orgType]
59
          if (info.orgType) {
60
            info.orgType = orgType[info.orgType]
61
          }
58 62
          this.catchProfessor[id] = info
59 63
          callback(info)
60 64
        }

+ 29 - 22
src/views/statistics/expertCount.vue

@ -65,10 +65,10 @@
65 65
</template>
66 66
67 67
<script>
68
import request from '@/utils/request'
68 69
import { pqExpertFilterList, queryTotalView, queryOneView } from '@/api/statistics'
69
import { parseTime } from '@/utils/index'
70
import { parseTime, kexiuUrl } from '@/utils/index'
70 71
import complexTable from '@/components/complexTable'
71
import crossDomin from '@/utils/CrossDomain'
72 72
import LineChart from './lineChart/LineChart'
73 73
import { dayListFn, chartModel } from './lineChart/chart'
74 74
import { doneFilter } from './ObjFilters'
@ -216,40 +216,47 @@ export default {
216 216
      return val
217 217
    },
218 218
    queryInfoList() {
219
      var that = this
219 220
      this.$http.get(pqExpertFilterList, {}, (response) => {
220 221
        if (response.success && response.data) {
221 222
          const epData = response.data
222
          let j = 0
223
          var hData = { num: 0, data: epData }
223 224
          for (let i = 0; i < epData.length; i++) {
224 225
            epData[i].assTime = parseTime(epData[i].assTime).substr(0, 16)
225
            j++
226
            crossDomin.getUserInfo(epData[i].id, data => {
227
              j--
228
              Object.assign(epData[i], data)
229
              if (j === 0) {
230
                this.tableData = epData
231
                this.total = epData.length
232
                if (this.total > this.pageSize) {
233
                  for (let i = 0; i < this.pageSize; i++) {
234
                    this.tableDataEnd.push(epData[i])
226
            hData.num++
227
            (function(item, m) {
228
              request.get(kexiuUrl + '/ajax/professor/editBaseInfo/' + item.id, {}, response => {
229
                if (response.success && response.data) {
230
                  const info = response.data
231
                  m.num--
232
                  Object.assign(item, info)
233
                  if (m.num === 0) {
234
                    that.tableDataEnd = []
235
                    that.total = epData.length
236
                    that.tableData = epData
237
                    that.sortTableOperate(that.tableData)
238
                    if (that.total > that.pageSize) {
239
                      for (let j = 0; j < that.pageSize; j++) {
240
                        that.tableDataEnd.push(that.tableData[j])
241
                      }
242
                    } else {
243
                      that.tableDataEnd = that.tableData
244
                    }
245
                    that.tableLoding = false
235 246
                  }
236
                } else {
237
                  this.tableDataEnd = epData
238 247
                }
239
                this.tableLoding = false
240
                this.tableDataEnd = this.sortTableOperate(this.tableDataEnd)
241
              }
242
            })
248
              })
249
            })(epData[i], hData)
243 250
          }
244 251
        } else {
245
          this.tableLoding = false
252
          that.tableLoding = false
246 253
        }
247 254
      })
248 255
    },
249 256
    current(val) {
250 257
      this.pageNo = val
251 258
      if (!this.flag) {
252
        this.currentChangePage(this.tableDataEnd)
259
        this.currentChangePage(this.tableData)
253 260
      } else {
254 261
        this.currentChangePage(this.filterTableDataEnd)
255 262
      }
@ -258,12 +265,12 @@ export default {
258 265
      let from = (this.pageNo - 1) * this.pageSize
259 266
      const to = this.pageNo * this.pageSize
260 267
      this.tableDataEnd = []
268
      this.sortTableOperate(list)
261 269
      for (; from < to; from++) {
262 270
        if (list[from]) {
263 271
          this.tableDataEnd.push(list[from])
264 272
        }
265 273
      }
266
      this.tableDataEnd = this.sortTableOperate(this.tableDataEnd)
267 274
    },
268 275
    changeRangerDate(val) {
269 276
      this.formFilter.dateRange = val

+ 1 - 1
src/views/statistics/objFilters.js

@ -12,7 +12,7 @@ const ObjFilters = {
12 12
        objArr = objArr.filter(item => {
13 13
          if (item[str.type]) {
14 14
            return item[str.type].match(str.val) !== null
15
          } else {
15
          } else if (str.val === '') {
16 16
            return item
17 17
          }
18 18
        })

+ 42 - 30
src/views/statistics/orgCount.vue

@ -60,10 +60,11 @@
60 60
</template>
61 61
62 62
<script>
63
import request from '@/utils/request'
63 64
import { pqOrgFilterList, queryTotalView, queryOneView } from '@/api/statistics'
64
import { parseTime } from '@/utils/index'
65
import { parseTime, kexiuUrl } from '@/utils/index'
66
import queryDict from '@/utils/queryDict'
65 67
import complexTable from '@/components/complexTable'
66
import crossDomin from '@/utils/CrossDomain'
67 68
import LineChart from './lineChart/LineChart'
68 69
import { dayListFn, chartModel } from './lineChart/chart'
69 70
import { doneFilter } from './ObjFilters'
@ -71,6 +72,7 @@ import { doneFilter } from './ObjFilters'
71 72
export default {
72 73
  data() {
73 74
    return {
75
      orgType: {},
74 76
      ChartItemDialogVisible: false,
75 77
      formFilter: {
76 78
        name: '',
@ -85,7 +87,7 @@ export default {
85 87
      tableDataEnd: [],
86 88
      filterTableDataEnd: [],
87 89
      flag: false,
88
      tableLoding: true,
90
      tableLoding: false,
89 91
      tableItem: [
90 92
        {
91 93
          tit: '图表',
@ -131,6 +133,12 @@ export default {
131 133
    LineChart
132 134
  },
133 135
  created() {
136
    var that = this
137
    queryDict.applyDict('QYLX', function(dictData) {
138
      dictData.map(item => {
139
        that.orgType[item.code] = item.caption
140
      })
141
    })
134 142
    this.queryInfoList()
135 143
    this.getInfoTotal()
136 144
  },
@ -198,46 +206,50 @@ export default {
198 206
      return val
199 207
    },
200 208
    queryInfoList() {
209
      var that = this
201 210
      this.$http.get(pqOrgFilterList, {}, (response) => {
202 211
        if (response.success && response.data) {
203 212
          const epData = response.data
204
          let j = 0
213
          var hData = { num: 0, data: epData }
205 214
          for (let i = 0; i < epData.length; i++) {
206
            epData[i].assTime = parseTime(epData[i].assTime).substr(0, 10)
207
            j++
208
            crossDomin.getAgencyInfo(epData[i].id, data => {
209
              j--
210
              Object.assign(epData[i], data)
211
              if (j === 0) {
212
                this.tableData = epData
213
                this.total = epData.length
214
                if (this.total > this.pageSize) {
215
                  for (let i = 0; i < this.pageSize; i++) {
216
                    this.tableDataEnd.push(epData[i])
215
            epData[i].assTime = parseTime(epData[i].assTime).substr(0, 16)
216
            hData.num++
217
            (function(item, m) {
218
              request.get(kexiuUrl + '/ajax/org/' + item.id, {}, response => {
219
                if (response.success && response.data) {
220
                  const info = response.data
221
                  if (info.orgType) {
222
                    info.orgType = that.orgType[info.orgType]
223
                  }
224
                  m.num--
225
                  Object.assign(item, info)
226
                  if (m.num === 0) {
227
                    that.tableDataEnd = []
228
                    that.total = epData.length
229
                    that.tableData = epData
230
                    that.sortTableOperate(that.tableData)
231
                    if (that.total > that.pageSize) {
232
                      for (let j = 0; j < that.pageSize; j++) {
233
                        that.tableDataEnd.push(that.tableData[j])
234
                      }
235
                    } else {
236
                      that.tableDataEnd = that.tableData
237
                    }
238
                    that.tableLoding = false
217 239
                  }
218
                } else {
219
                  this.tableDataEnd = epData
220 240
                }
221
                this.tableLoding = false
222
                this.tableDataEnd = this.sortTableOperate(this.tableDataEnd)
223
              }
224
            })
225
          }
226
          if (epData.length === 0) {
227
            this.dataList = []
228
            this.tableData = []
229
            this.total = 0
241
              })
242
            })(epData[i], hData)
230 243
          }
231 244
        } else {
232
          this.$sort.total = 0
233
          this.tableData = []
245
          that.tableLoding = false
234 246
        }
235 247
      })
236 248
    },
237 249
    current(val) {
238 250
      this.pageNo = val
239 251
      if (!this.flag) {
240
        this.currentChangePage(this.tableDataEnd)
252
        this.currentChangePage(this.tableData)
241 253
      } else {
242 254
        this.currentChangePage(this.filterTableDataEnd)
243 255
      }
@ -246,12 +258,12 @@ export default {
246 258
      let from = (this.pageNo - 1) * this.pageSize
247 259
      const to = this.pageNo * this.pageSize
248 260
      this.tableDataEnd = []
261
      this.sortTableOperate(list)
249 262
      for (; from < to; from++) {
250 263
        if (list[from]) {
251 264
          this.tableDataEnd.push(list[from])
252 265
        }
253 266
      }
254
      this.tableDataEnd = this.sortTableOperate(this.tableDataEnd)
255 267
    },
256 268
    changeRangerDate(val) {
257 269
      this.formFilter.dateRange = val

+ 1 - 1
src/views/statistics/resources.vue

@ -91,7 +91,7 @@
91 91
          },
92 92
          {
93 93
            prop: 'resourceName',
94
            tit: '服务名称',
94
            tit: '资源名称',
95 95
            active: 'active'
96 96
          },
97 97
          {

+ 1 - 1
src/views/statistics/results.vue

@ -95,7 +95,7 @@
95 95
          },
96 96
          {
97 97
            prop: 'authors',
98
            tit: '发布者',
98
            tit: '发明人',
99 99
            width: '160'
100 100
          },
101 101
          {