dbb9d71d608013e0a520732042805553e1f811fd.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <div>
  3. <div class="detailsTop" style="border: 1px dotted skyblue;">
  4. <div id="dcry" style="width: 100%;height: 100%;"></div>
  5. </div>
  6. <div class="detailsBottom" ref="table">
  7. <el-table
  8. border
  9. ref="multipleTable"
  10. :data="tableData"
  11. tooltip-effect="dark"
  12. >
  13. <el-table-column align="center" label="序号" min-width="50">
  14. <template slot-scope="scope">{{ (pageNum - 1) * pageSize + (scope.$index + 1) }}</template>
  15. </el-table-column>
  16. <el-table-column
  17. header-align="center"
  18. align="center"
  19. min-width="100"
  20. prop="orgNm"
  21. label="督查机构名称"
  22. show-overflow-tooltip
  23. ></el-table-column>
  24. <el-table-column
  25. header-align="center"
  26. align="center"
  27. min-width="100"
  28. prop="persName"
  29. label="督查人员名称"
  30. show-overflow-tooltip
  31. ></el-table-column>
  32. <el-table-column
  33. header-align="center"
  34. align="center"
  35. min-width="100"
  36. prop="pnm"
  37. label="督查组名称"
  38. show-overflow-tooltip
  39. ></el-table-column>
  40. <el-table-column
  41. header-align="center"
  42. align="center"
  43. min-width="100"
  44. prop="name"
  45. label="督查类型名称"
  46. show-overflow-tooltip
  47. ></el-table-column>
  48. <el-table-column
  49. header-align="center"
  50. align="center"
  51. min-width="80"
  52. label="操作"
  53. >
  54. <template slot-scope="scope">
  55. <el-button type="primary" size="mini" @click.stop="lookOver(scope.row.guid)">详情</el-button>
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. <el-pagination
  60. @size-change="handleSizeChange"
  61. @current-change="handleCurrentChange"
  62. :current-page="pageNum"
  63. :page-sizes="[10, 20, 100]"
  64. :page-size="20"
  65. :pager-count="3"
  66. layout="total, sizes, prev, pager, next, jumper"
  67. :total="total"
  68. style="text-align: center;margin-top: 1vh;">
  69. </el-pagination>
  70. <el-dialog :title="督查人员信息" :visible.sync="perInfoVisible" :append-to-body="true" :close-on-click-modal="false" width="20%">
  71. <div class="process_line" style="text-align: center;">
  72. <div style="width:100%; height:210px;text-align:center; padding-top:10px;">
  73.  <img v-if="peopleDetail.imgurl != null" style="width: 150px;height: 200px;"
  74. :src="peopleDetail.imgurl" alt="">
  75. <img v-else src="../../static/pic.jpg" alt="">
  76. </div>
  77. <div style="width:100%;height:35px;text-align:center; padding-top:0;font-size: 18px;font-weight: bold;">
  78.    <p>{{peopleDetail.persName}}</p>
  79. </div>
  80. <div class="item content4">
  81. <div class="item item2">
  82. <span class="label">单 位:</span>
  83. <div style="width:170px;border-bottom:1px solid #dddddd;display: inline-block;">
  84. <span class="spanInlineBlock" :title="peopleDetail.orgNm">{{peopleDetail.orgNm || "---"}}</span>
  85. </div>
  86. </div>
  87. <div class="item item2">
  88. <span class="label">职务/职称:</span>
  89. <div style="width:170px;border-bottom:1px solid #dddddd;display: inline-block;">
  90. <span class="spanInlineBlock" :title="peopleDetail.admDuty">{{peopleDetail.admDuty || "---"}}</span>
  91. </div>
  92. </div>
  93. <div class="item item2">
  94. <span class="label">编 号:</span>
  95. <div style="width:170px;border-bottom:1px solid #dddddd;display: inline-block;">
  96. <span class="spanInlineBlock" :title="peopleDetail.idnm">{{peopleDetail.idnm || "---"}}</span>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </el-dialog>
  102. </div>
  103. </div>
  104. </template>
  105. <script>
  106. import echarts from 'echarts'
  107. import request from '../../utils/gw_ajax_request';
  108. export default {
  109. name: "dcryDetails",
  110. props: ["adCode","requestSttmTime","requestEntmTime","requestOrgId","requestObjectType",'dcryVisible'],
  111. data() {
  112. return {
  113. tableHeight: '',
  114. tableData: [],
  115. pageNum: 1,
  116. pageSize: 20,
  117. total: 0,
  118. perInfoVisible:false,
  119. peopleDetail:'',
  120. guid:'',
  121. xData: [],
  122. yData: []
  123. }
  124. },
  125. mounted() {
  126. this.getEcharts();
  127. this.getTableData();
  128. this.init();
  129. },
  130. methods:{
  131. init() {
  132. this.tableHeight = this.$refs['table'].offsetHeight - 45;
  133. },
  134. getTableData(){
  135. let params = {
  136. "adCode": this.adCode,
  137. "pageSize": this.pageSize,
  138. "pageNum": this.pageNum,
  139. "startTime": this.requestSttmTime,
  140. "endTime": this.requestEntmTime,
  141. "orgIds": this.requestOrgId,
  142. "pTypes": this.requestObjectType
  143. }
  144. this.$nextTick(function () {
  145. request.post(`/pc/index/findPerByAdCode`,params).then(res =>{
  146. console.log(res)
  147. if(res.success){
  148. this.tableData = res.data.list;
  149. this.total = res.data.total;
  150. }else{
  151. this.$message.error(res.message);
  152. }
  153. }).catch(err =>{
  154. this.$message.error(err);
  155. })
  156. })
  157. },
  158. getEcharts(){
  159. let params = {
  160. "adCode": this.adCode,
  161. "startTime": this.requestSttmTime,
  162. "endTime": this.requestEntmTime,
  163. "orgIds": this.requestOrgId,
  164. "pTypes": this.requestObjectType
  165. };
  166. this.$nextTick(function () {
  167. request.post(`/pc/index/findPerCountByAdCode`, params).then(res => {
  168. if(res.success){
  169. let CountData = res.data;
  170. let xData = [];
  171. let yData = [];
  172. CountData.forEach((item, index) => {
  173. xData.push(item.name);
  174. yData.push(item.total);
  175. });
  176. this.xData = xData;
  177. this.yData = yData;
  178. console.log(this.xData,this.yData);
  179. this.initCharts();
  180. }
  181. }).catch(err => {
  182. })
  183. })
  184. },
  185. handleSizeChange(val) {
  186. this.pageSize = val;
  187. this.getTableData();
  188. },
  189. handleCurrentChange(val) {
  190. this.pageNum = val;
  191. this.getTableData();
  192. },
  193. initCharts(){
  194. let me = this;
  195. me.myChart = echarts.init(document.getElementById('dcry'));
  196. me.myChart.setOption({
  197. grid: {
  198. left: '7%',
  199. right: '5%',
  200. top: '15%',
  201. bottom: '25%',
  202. },
  203. title: {
  204. show: false
  205. },
  206. tooltip : {
  207. trigger: 'axis',
  208. label: {
  209. show: true
  210. },
  211. formatter: function (params) {
  212. return params[0].axisValue + ': ' +params[0].data + '个'
  213. }
  214. },
  215. legend: {
  216. data: me.xData,
  217. right: '3%',
  218. top: '10%',
  219. itemWidth: 11,
  220. itemHeight: 11,
  221. textStyle: {
  222. color: '#ffffff',
  223. fontSize: 13
  224. }
  225. },
  226. toolbox: {
  227. show: false,
  228. },
  229. xAxis: [
  230. {
  231. type: 'category',
  232. show: true,
  233. axisTick: {
  234. show: false,
  235. alignWithLabel: true
  236. },
  237. axisLabel: {
  238. rotate: 30,
  239. color: '#333',
  240. },
  241. axisLine: {
  242. show: true,
  243. lineStyle: {
  244. color: 'rgba(63, 158, 255, 1)'
  245. }
  246. },
  247. data: me.xData
  248. }
  249. ],
  250. yAxis: {
  251. axisLabel:{
  252. color:'#333'
  253. },
  254. axisLine: {
  255. show: true,
  256. lineStyle: {
  257. color: 'rgba(63, 158, 255, 1)'
  258. }
  259. },
  260. splitLine: {
  261. show: true,
  262. lineStyle: {
  263. type: 'dashed',
  264. color: 'rgba(33,148,246,0.2)'
  265. }
  266. },
  267. axisTick: {
  268. show: false
  269. },
  270. splitArea: {
  271. show: true,
  272. areaStyle: {
  273. color: 'rgba(255,255,255,1)'
  274. }
  275. },
  276. type: 'value',
  277. max: function(value) {
  278. return value.max;
  279. },
  280. min: function(value) {
  281. return value.min;
  282. },
  283. },
  284. series: [
  285. {
  286. type:'bar',
  287. label: {
  288. normal: {
  289. show: true,
  290. position: 'top',
  291. textStyle: {
  292. color: '#ff9780'
  293. }
  294. }
  295. },
  296. itemStyle: {
  297. normal: {
  298. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  299. offset: 0,
  300. color: "#ff9780" // 0% 处的颜色
  301. }, {
  302. offset: 1,
  303. color: "#FFBD9C" // 100% 处的颜色
  304. }], false)
  305. }
  306. },
  307. barWidth: '40%',
  308. yAxisIndex: 0,
  309. data: me.yData
  310. }
  311. ]
  312. });
  313. },
  314. // 详情接问题查看详情展示
  315. lookOver(id){
  316. request.get(`/bis/insp/${id}`).then(res =>{
  317. if(res.success){
  318. this.peopleDetail = res.data;
  319. this.perInfoVisible = true;
  320. }else{
  321. this.$message.error(res.message);
  322. }
  323. }).catch(err =>{
  324. this.$message.error(err);
  325. })
  326. }
  327. },
  328. watch:{
  329. adCode(n,o){
  330. this.adCode = n;
  331. this.getTableData();
  332. }
  333. },
  334. }
  335. </script>
  336. <style>
  337. .detailsTop,.detailsBottom{
  338. height: 30vh;
  339. overflow: auto;
  340. }
  341. .detailsBottom{
  342. margin-top: 2vh;
  343. }
  344. .process_line{
  345. z-index: 100000;
  346. }
  347. /*.v-modal{z-index: 1999 !important;}*/
  348. </style>