index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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="cbName">
  56. <template slot-scope="scope">
  57. {{ scope.row.cbName }}
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="指标名称" align="center" prop="colName">
  61. <template slot-scope="scope">
  62. {{ scope.row.colName }}
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="指标分数" align="center" prop="colValue">
  66. <template slot-scope="scope">
  67. {{ scope.row.colValue }}
  68. </template>
  69. </el-table-column>
  70. </el-table>
  71. <category-chart v-if="contentType == '2'" :chartData="ChartData" style="width: 100%"></category-chart> -->
  72. <!-- <category-chart :chartData="ChartData" style="width: 100%"></category-chart> -->
  73. </div>
  74. </template>
  75. <script>
  76. import { getZBFS,normFeelistAll,bondedList } from '@/api/portal/figure/figure.js';
  77. import CategoryChart from '../dashboard/categoryChart.vue';
  78. export default {
  79. name: 'ZBFS',
  80. components:{
  81. CategoryChart
  82. },
  83. data() {
  84. return {
  85. ChartData: [],
  86. contentType:'1',
  87. contentTypelist:[
  88. { label: '列表', value: '1' },
  89. { label: '柱状图', value: '2' },
  90. { label: '雷达图', value: '3' },
  91. ],
  92. datelist:[
  93. { label: '月', value: '1' },
  94. { label: '季度', value: '2' },
  95. { label: '年', value: '3' },
  96. ],
  97. jdlist:[
  98. { label: '第一季度', value: '1' },
  99. { label: '第二季度', value: '2' },
  100. { label: '第三季度', value: '3' },
  101. { label: '第四季度', value: '4' },
  102. ],
  103. dialogVisible: false,
  104. fileList: [],
  105. // 根路径
  106. baseURL: process.env.VUE_APP_BASE_API,
  107. // 遮罩层
  108. loading: true,
  109. // 显示搜索条件
  110. showSearch: true,
  111. // 系统管理表格数据
  112. dataList: [],
  113. // 查询参数
  114. queryParams: {
  115. cbIdArr:[], //保税区id集合
  116. dateType:'', //查询时间类型(1=月,2=季度,3=年)
  117. dateValue:'', //查询时间值
  118. normFeeId:'', //指标明细id
  119. },
  120. normFeelistAll:[], //指标列表
  121. regionList:[], //保税区列表
  122. };
  123. },
  124. created() {
  125. this.getNormFeelistAll()
  126. this.bondedList()
  127. },
  128. methods: {
  129. getList() {
  130. this.dataList = []
  131. this.ChartData =[]
  132. getZBFS(this.queryParams).then(response => {
  133. this.dataList = response.data;
  134. for (const i in response.data) {
  135. // this.ChartData.push({
  136. // name: response.data[i].colName,
  137. // value: response.data[i].colValue,
  138. // })
  139. if(this.chartData){
  140. console.log(this.chartData);
  141. }
  142. }
  143. this.loading = false;
  144. });
  145. },
  146. bondedList(){
  147. this.regionList = []
  148. bondedList().then(res=>{
  149. for (const i in res.data) {
  150. this.regionList.push({
  151. label:res.data[i].deptName,
  152. value:res.data[i].deptId,
  153. })
  154. }
  155. })
  156. },
  157. getNormFeelistAll(){
  158. this.normFeelistAll = []
  159. this.loading = true;
  160. normFeelistAll().then(res=>{
  161. this.loading = true;
  162. for (const i in res.data) {
  163. this.normFeelistAll.push({
  164. label:res.data[i].fname,
  165. value:res.data[i].id,
  166. })
  167. }
  168. this.loading = false;
  169. this.getList();
  170. })
  171. },
  172. handleQuery() {
  173. this.queryParams.pageNum = 1;
  174. this.getList();
  175. },
  176. /** 重置按钮操作 */
  177. resetQuery() {
  178. this.queryParams.cbIdArr = [];
  179. this.queryParams.dateType = '';
  180. this.queryParams.dateValue = '';
  181. this.queryParams.normFeeId = '';
  182. this.resetForm('queryForm');
  183. },
  184. }
  185. };
  186. </script>