lyn7568 6 years ago
parent
commit
c6b949c734

+ 1 - 1
config/index.js

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

+ 4 - 4
config/prod.env.js

4
  ENV_CONFIG:'"prod"',
4
  ENV_CONFIG:'"prod"',
5
  PLAT_ID: '"F5DEA8EDB12E421A9FC4B701BB6176A6"',
5
  PLAT_ID: '"F5DEA8EDB12E421A9FC4B701BB6176A6"',
6
  BASE_API: '""',
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
        :width="item.width ? item.width : ''" align="center" :className="item.active">
7
        :width="item.width ? item.width : ''" align="center" :className="item.active">
8
        <template slot-scope="scope">
8
        <template slot-scope="scope">
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>
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
            <el-button type="text" v-if="item.active"><a :href="parentChangedLink(scope.row.id)" target="_blank">{{scope.row[item.prop]}}</a></el-button>
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
            <div v-else> {{scope.row[item.prop]}}</div>
12
            <div v-else> {{scope.row[item.prop]}}</div>
13
          </div>
13
          </div>

+ 6 - 2
src/utils/CrossDomain.js

43
      } else {
43
      } else {
44
        this.catchAgency[id].img = defaultSet.img.org
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
      callback(this.catchAgency[id])
49
      callback(this.catchAgency[id])
48
    } else {
50
    } else {
49
      request.get(agencyUrl + id, {}, response => {
51
      request.get(agencyUrl + id, {}, response => {
54
          } else {
56
          } else {
55
            info.img = defaultSet.img.org
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
          this.catchProfessor[id] = info
62
          this.catchProfessor[id] = info
59
          callback(info)
63
          callback(info)
60
        }
64
        }

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

65
</template>
65
</template>
66
66
67
<script>
67
<script>
68
import request from '@/utils/request'
68
import { pqExpertFilterList, queryTotalView, queryOneView } from '@/api/statistics'
69
import { pqExpertFilterList, queryTotalView, queryOneView } from '@/api/statistics'
69
import { parseTime } from '@/utils/index'
70
import { parseTime, kexiuUrl } from '@/utils/index'
70
import complexTable from '@/components/complexTable'
71
import complexTable from '@/components/complexTable'
71
import crossDomin from '@/utils/CrossDomain'
72
import LineChart from './lineChart/LineChart'
72
import LineChart from './lineChart/LineChart'
73
import { dayListFn, chartModel } from './lineChart/chart'
73
import { dayListFn, chartModel } from './lineChart/chart'
74
import { doneFilter } from './ObjFilters'
74
import { doneFilter } from './ObjFilters'
216
      return val
216
      return val
217
    },
217
    },
218
    queryInfoList() {
218
    queryInfoList() {
219
      var that = this
219
      this.$http.get(pqExpertFilterList, {}, (response) => {
220
      this.$http.get(pqExpertFilterList, {}, (response) => {
220
        if (response.success && response.data) {
221
        if (response.success && response.data) {
221
          const epData = response.data
222
          const epData = response.data
222
          let j = 0
223
          var hData = { num: 0, data: epData }
223
          for (let i = 0; i < epData.length; i++) {
224
          for (let i = 0; i < epData.length; i++) {
224
            epData[i].assTime = parseTime(epData[i].assTime).substr(0, 16)
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
        } else {
251
        } else {
245
          this.tableLoding = false
252
          that.tableLoding = false
246
        }
253
        }
247
      })
254
      })
248
    },
255
    },
249
    current(val) {
256
    current(val) {
250
      this.pageNo = val
257
      this.pageNo = val
251
      if (!this.flag) {
258
      if (!this.flag) {
252
        this.currentChangePage(this.tableDataEnd)
259
        this.currentChangePage(this.tableData)
253
      } else {
260
      } else {
254
        this.currentChangePage(this.filterTableDataEnd)
261
        this.currentChangePage(this.filterTableDataEnd)
255
      }
262
      }
258
      let from = (this.pageNo - 1) * this.pageSize
265
      let from = (this.pageNo - 1) * this.pageSize
259
      const to = this.pageNo * this.pageSize
266
      const to = this.pageNo * this.pageSize
260
      this.tableDataEnd = []
267
      this.tableDataEnd = []
268
      this.sortTableOperate(list)
261
      for (; from < to; from++) {
269
      for (; from < to; from++) {
262
        if (list[from]) {
270
        if (list[from]) {
263
          this.tableDataEnd.push(list[from])
271
          this.tableDataEnd.push(list[from])
264
        }
272
        }
265
      }
273
      }
266
      this.tableDataEnd = this.sortTableOperate(this.tableDataEnd)
267
    },
274
    },
268
    changeRangerDate(val) {
275
    changeRangerDate(val) {
269
      this.formFilter.dateRange = val
276
      this.formFilter.dateRange = val

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

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

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

60
</template>
60
</template>
61
61
62
<script>
62
<script>
63
import request from '@/utils/request'
63
import { pqOrgFilterList, queryTotalView, queryOneView } from '@/api/statistics'
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
import complexTable from '@/components/complexTable'
67
import complexTable from '@/components/complexTable'
66
import crossDomin from '@/utils/CrossDomain'
67
import LineChart from './lineChart/LineChart'
68
import LineChart from './lineChart/LineChart'
68
import { dayListFn, chartModel } from './lineChart/chart'
69
import { dayListFn, chartModel } from './lineChart/chart'
69
import { doneFilter } from './ObjFilters'
70
import { doneFilter } from './ObjFilters'
71
export default {
72
export default {
72
  data() {
73
  data() {
73
    return {
74
    return {
75
      orgType: {},
74
      ChartItemDialogVisible: false,
76
      ChartItemDialogVisible: false,
75
      formFilter: {
77
      formFilter: {
76
        name: '',
78
        name: '',
85
      tableDataEnd: [],
87
      tableDataEnd: [],
86
      filterTableDataEnd: [],
88
      filterTableDataEnd: [],
87
      flag: false,
89
      flag: false,
88
      tableLoding: true,
90
      tableLoding: false,
89
      tableItem: [
91
      tableItem: [
90
        {
92
        {
91
          tit: '图表',
93
          tit: '图表',
131
    LineChart
133
    LineChart
132
  },
134
  },
133
  created() {
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
    this.queryInfoList()
142
    this.queryInfoList()
135
    this.getInfoTotal()
143
    this.getInfoTotal()
136
  },
144
  },
198
      return val
206
      return val
199
    },
207
    },
200
    queryInfoList() {
208
    queryInfoList() {
209
      var that = this
201
      this.$http.get(pqOrgFilterList, {}, (response) => {
210
      this.$http.get(pqOrgFilterList, {}, (response) => {
202
        if (response.success && response.data) {
211
        if (response.success && response.data) {
203
          const epData = response.data
212
          const epData = response.data
204
          let j = 0
213
          var hData = { num: 0, data: epData }
205
          for (let i = 0; i < epData.length; i++) {
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
        } else {
244
        } else {
232
          this.$sort.total = 0
233
          this.tableData = []
245
          that.tableLoding = false
234
        }
246
        }
235
      })
247
      })
236
    },
248
    },
237
    current(val) {
249
    current(val) {
238
      this.pageNo = val
250
      this.pageNo = val
239
      if (!this.flag) {
251
      if (!this.flag) {
240
        this.currentChangePage(this.tableDataEnd)
252
        this.currentChangePage(this.tableData)
241
      } else {
253
      } else {
242
        this.currentChangePage(this.filterTableDataEnd)
254
        this.currentChangePage(this.filterTableDataEnd)
243
      }
255
      }
246
      let from = (this.pageNo - 1) * this.pageSize
258
      let from = (this.pageNo - 1) * this.pageSize
247
      const to = this.pageNo * this.pageSize
259
      const to = this.pageNo * this.pageSize
248
      this.tableDataEnd = []
260
      this.tableDataEnd = []
261
      this.sortTableOperate(list)
249
      for (; from < to; from++) {
262
      for (; from < to; from++) {
250
        if (list[from]) {
263
        if (list[from]) {
251
          this.tableDataEnd.push(list[from])
264
          this.tableDataEnd.push(list[from])
252
        }
265
        }
253
      }
266
      }
254
      this.tableDataEnd = this.sortTableOperate(this.tableDataEnd)
255
    },
267
    },
256
    changeRangerDate(val) {
268
    changeRangerDate(val) {
257
      this.formFilter.dateRange = val
269
      this.formFilter.dateRange = val