index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
  4. <el-form-item label="保税区">
  5. <el-select v-model="queryParams.cbIdArr" multiple placeholder="请选择保税区">
  6. <el-option
  7. v-for="item in regionList"
  8. :key="item.value"
  9. :label="item.label"
  10. :value="item.value">
  11. </el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="指标名称">
  15. <el-select v-model="queryParams.normFeeId" placeholder="请选择指标名称">
  16. <el-option
  17. v-for="item in normFeelistAll"
  18. :key="item.value"
  19. :label="item.label"
  20. :value="item.value">
  21. </el-option>
  22. </el-select>
  23. </el-form-item>
  24. <!-- <el-form-item label="时间类型">
  25. <el-select v-model="queryParams.dateType" placeholder="请选择" clearable filterable class="se">
  26. <el-option v-for="t in datelist" :key="t.value" :label="t.label" :value="t.value" />
  27. </el-select>
  28. <el-select v-if="queryParams.dateType == 1" v-model="queryParams.dateValue" placeholder="选择月" clearable filterable class="se" style="margin-left: 10px;">
  29. <el-option v-for="t in 12" :key="t.value" :label="t + '月'" :value="t" />
  30. </el-select>
  31. <el-select v-if="queryParams.dateType == 2" v-model="queryParams.dateValue" placeholder="选择季度" clearable filterable class="se" style="margin-left: 10px;">
  32. <el-option v-for="t in jdlist" :key="t.value" :label="t.label" :value="t.value"/>
  33. </el-select>
  34. <el-date-picker v-if="queryParams.dateType == 3" v-model="queryParams.dateValue" type="year" placeholder="选择年" value-format="yyyy" format="yyyy 年" style="margin-left: 10px;"></el-date-picker>
  35. </el-form-item> -->
  36. <el-form-item>
  37. <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  38. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  39. </el-form-item>
  40. <el-form-item label="图形类型">
  41. <el-select v-model="contentType" placeholder="请选择图形类型">
  42. <el-option
  43. v-for="item in contentTypelist"
  44. :key="item.value"
  45. :label="item.label"
  46. :value="item.value">
  47. </el-option>
  48. </el-select>
  49. </el-form-item>
  50. </el-form>
  51. <el-row :gutter="10" class="mb8">
  52. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  53. </el-row>
  54. <el-table :data="dataList" v-if="contentType == '1'">
  55. <el-table-column label="保税区" align="center" prop="colName">
  56. <template slot-scope="scope">
  57. {{ scope.row.colName }}
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="绩效指标分值" align="center" prop="colValue">
  61. <template slot-scope="scope">
  62. {{ scope.row.colValue }}
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. <category-chart v-if="contentType == '2'" itemName="绩效指标分值" :chartData="ChartData" style="width: 100%"></category-chart>
  67. <radar-char v-if="contentType == '3'" :chartData="ChartData" style="width: 100%"></radar-char>
  68. </div>
  69. </template>
  70. <script>
  71. import { getZBCS,normFeelistAll,bondedList } from '@/api/portal/figure/figure.js';
  72. import CategoryChart from '../dashboard/categoryChart.vue';
  73. import radarChar from '../dashboard/radarChar.vue';
  74. export default {
  75. name: 'ZBCS', //指标参数排行数据
  76. components:{
  77. CategoryChart,
  78. radarChar
  79. },
  80. data() {
  81. return {
  82. ChartData: [],
  83. contentType:'1',
  84. contentTypelist:[
  85. { label: '列表', value: '1' },
  86. { label: '柱状图', value: '2' },
  87. { label: '雷达图', value: '3' },
  88. ],
  89. datelist:[
  90. { label: '月', value: '1' },
  91. { label: '季度', value: '2' },
  92. { label: '年', value: '3' },
  93. ],
  94. jdlist:[
  95. { label: '第一季度', value: '1' },
  96. { label: '第二季度', value: '2' },
  97. { label: '第三季度', value: '3' },
  98. { label: '第四季度', value: '4' },
  99. ],
  100. dialogVisible: false,
  101. fileList: [],
  102. // 根路径
  103. baseURL: process.env.VUE_APP_BASE_API,
  104. // 遮罩层
  105. loading: true,
  106. // 显示搜索条件
  107. showSearch: true,
  108. // 系统管理表格数据
  109. dataList: [],
  110. // 查询参数
  111. queryParams: {
  112. cbIdArr:[], //保税区id集合
  113. dateType:'', //查询时间类型(1=月,2=季度,3=年)
  114. dateValue:'', //查询时间值
  115. normFeeId:'', //指标明细id
  116. },
  117. normFeelistAll:[], //指标列表
  118. regionList:[], //保税区列表
  119. };
  120. },
  121. created() {
  122. this.getNormFeelistAll()
  123. this.bondedList()
  124. },
  125. methods: {
  126. getList() {
  127. this.dataList = []
  128. this.ChartData =[]
  129. getZBCS(this.queryParams).then(response => {
  130. this.dataList = response.data;
  131. for (const i in response.data) {
  132. this.ChartData.push({
  133. name: response.data[i].colName,
  134. value: response.data[i].colValue,
  135. })
  136. }
  137. this.loading = false;
  138. });
  139. },
  140. bondedList(){
  141. this.regionList = []
  142. bondedList().then(res=>{
  143. for (const i in res.data) {
  144. this.regionList.push({
  145. label:res.data[i].deptName,
  146. value:res.data[i].deptId,
  147. })
  148. }
  149. })
  150. },
  151. getNormFeelistAll(){
  152. this.normFeelistAll = []
  153. this.loading = true;
  154. normFeelistAll().then(res=>{
  155. this.loading = true;
  156. for (const i in res.data) {
  157. this.normFeelistAll.push({
  158. label:res.data[i].fname,
  159. value:res.data[i].id,
  160. })
  161. }
  162. this.loading = false;
  163. this.getList();
  164. })
  165. },
  166. handleQuery() {
  167. this.queryParams.pageNum = 1;
  168. this.getList();
  169. },
  170. /** 重置按钮操作 */
  171. resetQuery() {
  172. this.queryParams.cbIdArr = [];
  173. this.queryParams.dateType = '';
  174. this.queryParams.dateValue = '';
  175. this.queryParams.normFeeId = '';
  176. this.resetForm('queryForm');
  177. },
  178. }
  179. };
  180. </script>