OtherPointsList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <div>
  3. <el-form :inline="true" v-show="isSearchCollapse" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
  4. <!-- 搜索框-->
  5. <el-col :span="8">
  6. <el-form-item label="评价年份" prop="yearOfEvaluation">
  7. <el-date-picker
  8. v-model="searchForm.yearOfEvaluation"
  9. type="year"
  10. size="small"
  11. value-format="yyyy"
  12. placeholder="选择年份">
  13. </el-date-picker>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="8">
  17. <el-form-item label="单位名称" prop="unitName">
  18. <el-input size="small" v-model="searchForm.unitName" placeholder="单位名称" clearable></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-form-item>
  22. <el-button type="primary" @click="refreshList()" size="small">查询</el-button>
  23. <el-button @click="resetSearch()" size="small">重置</el-button>
  24. </el-form-item>
  25. </el-form>
  26. <el-row>
  27. <!-- <el-button v-if="hasPermission('deductiondetails:deductionDetails:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">扣分</el-button>-->
  28. <el-button v-if="hasPermission('deductiondetails:deductionDetails:edit')" type="warning" size="small" icon="el-icon-edit-outline" @click="sub()"
  29. :disabled="dataListSelections.length != 1" plain>扣分</el-button>
  30. </el-row>
  31. <el-table
  32. :data="dataList"
  33. border
  34. size="medium"
  35. @selection-change="selectionChangeHandle"
  36. @sort-change="sortChangeHandle"
  37. v-loading="loading"
  38. class="table">
  39. <el-table-column
  40. type="selection"
  41. header-align="center"
  42. align="center"
  43. width="50">
  44. </el-table-column>
  45. <el-table-column
  46. prop="yearOfEvaluation"
  47. show-overflow-tooltip
  48. sortable="custom"
  49. label="施工单位年份">
  50. </el-table-column>
  51. <el-table-column
  52. prop="unitName"
  53. show-overflow-tooltip
  54. sortable="custom"
  55. label="施工单位名称">
  56. </el-table-column>
  57. <el-table-column
  58. prop="basicScore"
  59. show-overflow-tooltip
  60. sortable="custom"
  61. label="基础分数">
  62. </el-table-column>
  63. <el-table-column
  64. prop="reasonOne"
  65. show-overflow-tooltip
  66. sortable="custom"
  67. label="对安能杰相关重点工作进行支撑,视情况加分。">
  68. <template slot-scope="scope">
  69. <el-link type="primary" :underline="false" @click="edit(scope.row.id,'1')">{{scope.row.reasonOne}}</el-link>
  70. </template>
  71. </el-table-column>
  72. <el-table-column
  73. prop="reasonTwo"
  74. show-overflow-tooltip
  75. sortable="custom"
  76. label="对安能杰相关重点工作未进行支撑或支撑不足,视情况扣分。">
  77. <template slot-scope="scope">
  78. <el-link type="primary" :underline="false" @click="edit(scope.row.id,'2')">{{scope.row.reasonTwo}}</el-link>
  79. </template>
  80. </el-table-column>
  81. <el-table-column
  82. prop="reasonThree"
  83. show-overflow-tooltip
  84. sortable="custom"
  85. label="完成省市重点工程,工程进度、质量受到甲方好评,安能杰获赠甲方锦旗,视情况加分。">
  86. <template slot-scope="scope">
  87. <el-link type="primary" :underline="false" @click="edit(scope.row.id,'3')">{{scope.row.reasonThree}}</el-link>
  88. </template>
  89. </el-table-column>
  90. <el-table-column
  91. prop="reasonFour"
  92. show-overflow-tooltip
  93. sortable="custom"
  94. label="出现因施工产生廉政问题线索经调查属实的情况,全年考评分数为0,情形恶劣的,从合格供应商名录中剔除。★">
  95. <template slot-scope="scope">
  96. <el-link type="primary" :underline="false" @click="edit(scope.row.id,'4')">{{scope.row.reasonFour}}</el-link>
  97. </template>
  98. </el-table-column>
  99. <el-table-column
  100. prop="reasonFive"
  101. show-overflow-tooltip
  102. sortable="custom"
  103. label="承担工程范围内发生设备、人身伤亡事故、交通事故、电网事故等情况,全年考评分数为0,情形恶劣的,从合格供应商名录中剔除。★">
  104. <template slot-scope="scope">
  105. <el-link type="primary" :underline="false" @click="edit(scope.row.id,'5')">{{scope.row.reasonFive}}</el-link>
  106. </template>
  107. </el-table-column>
  108. <el-table-column
  109. prop="reasonSix"
  110. show-overflow-tooltip
  111. sortable="custom"
  112. label="分包商超越资质承接业务,签订分包合同,全年考评分数为0,情形恶劣的,从合格供应商名录中剔除。★">
  113. <template slot-scope="scope">
  114. <el-link type="primary" :underline="false" @click="edit(scope.row.id,'6')">{{scope.row.reasonSix}}</el-link>
  115. </template>
  116. </el-table-column>
  117. <el-table-column
  118. prop="sumScore"
  119. show-overflow-tooltip
  120. sortable="custom"
  121. label="汇总评分">
  122. </el-table-column>
  123. </el-table>
  124. <el-pagination
  125. @size-change="sizeChangeHandle"
  126. @current-change="currentChangeHandle"
  127. :current-page="pageNo"
  128. :page-sizes="[10, 20, 50, 100]"
  129. :page-size="pageSize"
  130. :total="total"
  131. background
  132. layout="total, sizes, prev, pager, next, jumper">
  133. </el-pagination>
  134. <!-- 弹窗, 新增 / 修改 -->
  135. <DeductionShowDetailsForm ref="deductionShowDetailsForm" @refreshDataList="refreshList"></DeductionShowDetailsForm>
  136. <DeductionDetailsForm ref="deductionDetailsForm" @refreshDataList="refreshList"></DeductionDetailsForm>
  137. </div>
  138. </template>
  139. <script>
  140. import DeductionShowDetailsForm from './DeductionShowDetailsForm'
  141. import DeductionDetailsForm from '../deductiondetails/DeductionDetailsForm'
  142. export default {
  143. data () {
  144. return {
  145. searchForm: {
  146. yearOfEvaluation: new Date().getFullYear().toString(),
  147. id: '',
  148. unitId: '',
  149. classId: ''
  150. },
  151. columns: [],
  152. dataList: [],
  153. pageNo: 1,
  154. pageSize: 10,
  155. total: 0,
  156. orderBy: '',
  157. subClass: '',
  158. classId: '',
  159. dataListSelections: [],
  160. isSearchCollapse: false,
  161. isImportCollapse: false,
  162. loading: false
  163. }
  164. },
  165. components: {
  166. DeductionShowDetailsForm,
  167. DeductionDetailsForm
  168. },
  169. activated () {
  170. this.refreshList()
  171. },
  172. methods: {
  173. // 获取数据列表
  174. refreshList () {
  175. this.loading = true
  176. this.$http({
  177. url: '/deductionShowDetails/deductionShowDetails/otherPointsList',
  178. method: 'get',
  179. params: {
  180. 'pageNo': this.pageNo,
  181. 'pageSize': this.pageSize,
  182. 'orderBy': this.orderBy,
  183. ...this.searchForm
  184. }
  185. }).then(({data}) => {
  186. if (data && data.success) {
  187. console.log(data)
  188. this.dataList = data.page.list
  189. this.total = data.page.count
  190. this.loading = false
  191. }
  192. })
  193. },
  194. // 每页数
  195. sizeChangeHandle (val) {
  196. this.pageSize = val
  197. this.pageNo = 1
  198. this.refreshList()
  199. },
  200. // 当前页
  201. currentChangeHandle (val) {
  202. this.pageNo = val
  203. this.refreshList()
  204. },
  205. // 多选
  206. selectionChangeHandle (val) {
  207. this.dataListSelections = val
  208. },
  209. // 排序
  210. sortChangeHandle (obj) {
  211. if (obj.order === 'ascending') {
  212. this.orderBy = obj.prop + ' asc'
  213. } else if (obj.order === 'descending') {
  214. this.orderBy = obj.prop + ' desc'
  215. } else {
  216. this.orderBy = ''
  217. }
  218. this.refreshList()
  219. },
  220. // 新增
  221. add () {
  222. this.$refs.deductionShowDetailsForm.init('add', '')
  223. },
  224. edit (id, type) {
  225. id = id || this.dataListSelections.map(item => {
  226. return item.id
  227. })[0]
  228. console.log(id)
  229. switch (type) {
  230. case '1':
  231. this.subClass = '324d659b184b40068f9524848729070f'
  232. this.classId = '2f0e74b9e50b4bbb8d6322feac578076'
  233. break
  234. case '2':
  235. this.subClass = '2da85bc46a474f5fabab19a456b3f09c'
  236. this.classId = '2f0e74b9e50b4bbb8d6322feac578076'
  237. break
  238. case '3':
  239. this.subClass = '6f3134f09f404a0db5c7f3ccf9830993'
  240. this.classId = '2f0e74b9e50b4bbb8d6322feac578076'
  241. break
  242. case '4':
  243. this.subClass = '8c72c9a41d5445dc80e43efe90f9eec8'
  244. this.classId = '6018a3a93b164602aebc08ae44207ba5'
  245. break
  246. case '5':
  247. this.subClass = '0c242a74d37c4005a45655329e8cb178'
  248. this.classId = '6018a3a93b164602aebc08ae44207ba5'
  249. break
  250. case '6':
  251. this.subClass = 'be115e9ac0c841d5b475743be8499f4c'
  252. this.classId = '6018a3a93b164602aebc08ae44207ba5'
  253. break
  254. }
  255. this.$router.push({path: './DeductionShowDetailsList', query: {unitId: id, subClass: this.subClass, classId: this.classId}})
  256. },
  257. sub (id) {
  258. id = id || this.dataListSelections.map(item => {
  259. return item.id
  260. })[0]
  261. this.$refs.deductionDetailsForm.init('edit', id, '2f0e74b9e50b4bbb8d6322feac578076')
  262. },
  263. // 查看
  264. view (id) {
  265. this.$refs.deductionDetailsForm.init('edit', id)
  266. },
  267. // 删除
  268. del (id) {
  269. let ids = id || this.dataListSelections.map(item => {
  270. return item.id
  271. }).join(',')
  272. this.$confirm(`确定删除所选项吗?`, '提示', {
  273. confirmButtonText: '确定',
  274. cancelButtonText: '取消',
  275. type: 'warning'
  276. }).then(() => {
  277. this.loading = true
  278. this.$http({
  279. url: '/deductionshowdetails/deductionShowDetails/delete',
  280. method: 'delete',
  281. params: {'ids': ids}
  282. }).then(({data}) => {
  283. if (data && data.success) {
  284. this.$message.success(data.msg)
  285. this.refreshList()
  286. }
  287. this.loading = false
  288. })
  289. })
  290. },
  291. // 导入成功
  292. uploadSuccess (res, file) {
  293. if (res.success) {
  294. this.$message.success({dangerouslyUseHTMLString: true,
  295. message: res.msg})
  296. } else {
  297. this.$message.error(res.msg)
  298. }
  299. },
  300. // 下载模板
  301. downloadTpl () {
  302. this.$utils.download('/deductionshowdetails/deductionShowDetails/import/template')
  303. },
  304. exportExcel () {
  305. this.$utils.download('/deductionshowdetails/deductionShowDetails/export')
  306. },
  307. resetSearch () {
  308. this.$refs.searchForm.resetFields()
  309. this.refreshList()
  310. }
  311. }
  312. }
  313. </script>