OtherPointsList.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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. dataListSelections: [],
  159. isSearchCollapse: false,
  160. isImportCollapse: false,
  161. loading: false
  162. }
  163. },
  164. components: {
  165. DeductionShowDetailsForm,
  166. DeductionDetailsForm
  167. },
  168. activated () {
  169. this.refreshList()
  170. },
  171. methods: {
  172. // 获取数据列表
  173. refreshList () {
  174. this.loading = true
  175. this.$http({
  176. url: '/deductionShowDetails/deductionShowDetails/otherPointsList',
  177. method: 'get',
  178. params: {
  179. 'pageNo': this.pageNo,
  180. 'pageSize': this.pageSize,
  181. 'orderBy': this.orderBy,
  182. ...this.searchForm
  183. }
  184. }).then(({data}) => {
  185. if (data && data.success) {
  186. console.log(data)
  187. this.dataList = data.page.list
  188. this.total = data.page.count
  189. this.loading = false
  190. }
  191. })
  192. },
  193. // 每页数
  194. sizeChangeHandle (val) {
  195. this.pageSize = val
  196. this.pageNo = 1
  197. this.refreshList()
  198. },
  199. // 当前页
  200. currentChangeHandle (val) {
  201. this.pageNo = val
  202. this.refreshList()
  203. },
  204. // 多选
  205. selectionChangeHandle (val) {
  206. this.dataListSelections = val
  207. },
  208. // 排序
  209. sortChangeHandle (obj) {
  210. if (obj.order === 'ascending') {
  211. this.orderBy = obj.prop + ' asc'
  212. } else if (obj.order === 'descending') {
  213. this.orderBy = obj.prop + ' desc'
  214. } else {
  215. this.orderBy = ''
  216. }
  217. this.refreshList()
  218. },
  219. // 新增
  220. add () {
  221. this.$refs.deductionShowDetailsForm.init('add', '')
  222. },
  223. edit (id, type) {
  224. id = id || this.dataListSelections.map(item => {
  225. return item.id
  226. })[0]
  227. console.log(id)
  228. switch (type) {
  229. case '1':
  230. this.subClass = '324d659b184b40068f9524848729070f'
  231. break
  232. case '2':
  233. this.subClass = '2da85bc46a474f5fabab19a456b3f09c'
  234. break
  235. case '3':
  236. this.subClass = '6f3134f09f404a0db5c7f3ccf9830993'
  237. break
  238. case '4':
  239. this.subClass = '8c72c9a41d5445dc80e43efe90f9eec8'
  240. break
  241. case '5':
  242. this.subClass = '0c242a74d37c4005a45655329e8cb178'
  243. break
  244. case '6':
  245. this.subClass = 'be115e9ac0c841d5b475743be8499f4c'
  246. break
  247. }
  248. this.$router.push({path: './DeductionShowDetailsList', query: {unitId: id, subClass: this.subClass}})
  249. },
  250. sub (id) {
  251. id = id || this.dataListSelections.map(item => {
  252. return item.id
  253. })[0]
  254. this.$refs.deductionDetailsForm.init('edit', id)
  255. },
  256. // 查看
  257. view (id) {
  258. this.$refs.deductionShowDetailsForm.init('view', id)
  259. },
  260. // 删除
  261. del (id) {
  262. let ids = id || this.dataListSelections.map(item => {
  263. return item.id
  264. }).join(',')
  265. this.$confirm(`确定删除所选项吗?`, '提示', {
  266. confirmButtonText: '确定',
  267. cancelButtonText: '取消',
  268. type: 'warning'
  269. }).then(() => {
  270. this.loading = true
  271. this.$http({
  272. url: '/deductionshowdetails/deductionShowDetails/delete',
  273. method: 'delete',
  274. params: {'ids': ids}
  275. }).then(({data}) => {
  276. if (data && data.success) {
  277. this.$message.success(data.msg)
  278. this.refreshList()
  279. }
  280. this.loading = false
  281. })
  282. })
  283. },
  284. // 导入成功
  285. uploadSuccess (res, file) {
  286. if (res.success) {
  287. this.$message.success({dangerouslyUseHTMLString: true,
  288. message: res.msg})
  289. } else {
  290. this.$message.error(res.msg)
  291. }
  292. },
  293. // 下载模板
  294. downloadTpl () {
  295. this.$utils.download('/deductionshowdetails/deductionShowDetails/import/template')
  296. },
  297. exportExcel () {
  298. this.$utils.download('/deductionshowdetails/deductionShowDetails/export')
  299. },
  300. resetSearch () {
  301. this.$refs.searchForm.resetFields()
  302. this.refreshList()
  303. }
  304. }
  305. }
  306. </script>