ItdmWeituoInfoList.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="委托单位名称">
  9. <j-search-select-tag placeholder="请选择委托单位名称" v-model="queryParam.weituoClient" :dictOptions="weituoClientList"/>
  10. <!-- <a-input placeholder="请输入委托单位名称" v-model="queryParam.weituoClient"></a-input>-->
  11. </a-form-item>
  12. </a-col>
  13. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  14. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  15. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  16. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  17. </span>
  18. </a-col>
  19. </a-row>
  20. </a-form>
  21. </div>
  22. <!-- 查询区域-END -->
  23. <!-- 操作按钮区域 -->
  24. <div class="table-operator">
  25. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  26. <a-button type="primary" icon="download" @click="handleExportXls('委托信息')">导出</a-button>
  27. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  28. <a-button type="primary" icon="import">导入</a-button>
  29. </a-upload>
  30. <!-- 高级查询区域 -->
  31. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  32. <a-dropdown v-if="selectedRowKeys.length > 0">
  33. <a-menu slot="overlay">
  34. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  35. </a-menu>
  36. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  37. </a-dropdown>
  38. </div>
  39. <!-- table区域-begin -->
  40. <div>
  41. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  42. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  43. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  44. </div>
  45. <a-table
  46. ref="table"
  47. size="middle"
  48. :scroll="{x:true}"
  49. bordered
  50. rowKey="id"
  51. :columns="columns"
  52. :dataSource="dataSource"
  53. :pagination="ipagination"
  54. :loading="loading"
  55. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  56. class="j-table-force-nowrap"
  57. @change="handleTableChange">
  58. <template slot="htmlSlot" slot-scope="text">
  59. <div v-html="text"></div>
  60. </template>
  61. <template slot="imgSlot" slot-scope="text,record">
  62. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  63. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  64. </template>
  65. <template slot="fileSlot" slot-scope="text">
  66. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  67. <a-button
  68. v-else
  69. :ghost="true"
  70. type="primary"
  71. icon="download"
  72. size="small"
  73. @click="downloadFile(text)">
  74. 下载
  75. </a-button>
  76. </template>
  77. <span slot="action" slot-scope="text, record">
  78. <!-- <a-popconfirm :title="record.completeStatus == 0 ? '确定该委托项目已完结吗,完结后不可修改': '该委托项目已完结,不可修改'" @confirm="() => handleWancheng(record)">
  79. <a>{{record.completeStatus == 0 ? '未完结': '已完结'}}</a>
  80. </a-popconfirm> -->
  81. <a @click="handleEdit(record)" :disabled="record.shenheStatus === '0' || record.shenheStatus === '1'">编辑</a>
  82. <a-divider type="vertical" />
  83. <a-dropdown>
  84. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  85. <a-menu slot="overlay">
  86. <a-menu-item>
  87. <a @click="handleDetail(record)">详情</a>
  88. </a-menu-item>
  89. <a-menu-item>
  90. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  91. <a>删除</a>
  92. </a-popconfirm>
  93. </a-menu-item>
  94. </a-menu>
  95. </a-dropdown>
  96. </span>
  97. </a-table>
  98. </div>
  99. <itdm-weituo-info-modal ref="modalForm" @ok="modalFormOk"></itdm-weituo-info-modal>
  100. </a-card>
  101. </template>
  102. <script>
  103. import '@/assets/less/TableExpand.less'
  104. import { mixinDevice } from '@/utils/mixin'
  105. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  106. import ItdmWeituoInfoModal from './modules/ItdmWeituoInfoModal'
  107. import { ajaxGetDictItems, loadCategoryData } from '@/api/api'
  108. import { filterMultiDictText } from '@comp/dict/JDictSelectUtil'
  109. import { getAction } from '@api/manage'
  110. export default {
  111. name: 'ItdmWeituoInfoList',
  112. mixins:[JeecgListMixin, mixinDevice],
  113. components: {
  114. ItdmWeituoInfoModal
  115. },
  116. data () {
  117. return {
  118. weituoClientList:[],
  119. description: '委托信息管理页面',
  120. // 表头
  121. columns: [
  122. {
  123. title: '#',
  124. dataIndex: '',
  125. key:'rowIndex',
  126. width:60,
  127. align:"center",
  128. customRender:function (t,r,index) {
  129. return parseInt(index)+1;
  130. }
  131. },
  132. {
  133. title:'委托编号',
  134. align:"center",
  135. dataIndex: 'weituoNo'
  136. },
  137. {
  138. title:'委托单位名称',
  139. align:"center",
  140. dataIndex: 'weituoClient'
  141. },
  142. {
  143. title:'委托单位地址',
  144. align:"center",
  145. dataIndex: 'weituoAddress'
  146. },
  147. {
  148. title:'委托联系人',
  149. align:"center",
  150. dataIndex: 'weituoLxr'
  151. },
  152. {
  153. title:'委托电话',
  154. align:"center",
  155. dataIndex: 'weituoPhone'
  156. },
  157. {
  158. title:'委托邮箱',
  159. align:"center",
  160. dataIndex: 'weituoEmail'
  161. },
  162. {
  163. title:'报告用章',
  164. align:"center",
  165. dataIndex: 'bgyz',
  166. customRender: (text) => (text ? filterMultiDictText(this.dictOptions['bgyz'], text) : '')
  167. },
  168. {
  169. title:'报告形式',
  170. align:"center",
  171. dataIndex: 'bgxs',
  172. customRender: (text) => (text ? filterMultiDictText(this.dictOptions['bgxs'], text) : '')
  173. },
  174. {
  175. title:'特殊要求',
  176. align:"center",
  177. dataIndex: 'teshuyaoqiu'
  178. },
  179. {
  180. title:'试验条件文件',
  181. align:"center",
  182. dataIndex: 'tiaojianFile',
  183. scopedSlots: {customRender: 'fileSlot'}
  184. },
  185. {
  186. title:'审核状态',
  187. align:"center",
  188. dataIndex: 'shenheStatus_dictText',
  189. },
  190. {
  191. title:'审核拒绝原因',
  192. align:"center",
  193. dataIndex: 'shenheMsg'
  194. },
  195. {
  196. title: '操作',
  197. dataIndex: 'action',
  198. align:"center",
  199. fixed:"right",
  200. width:147,
  201. scopedSlots: { customRender: 'action' }
  202. }
  203. ],
  204. url: {
  205. list: "/weituo/itdmWeituoInfo/list",
  206. delete: "/weituo/itdmWeituoInfo/delete",
  207. deleteBatch: "/weituo/itdmWeituoInfo/deleteBatch",
  208. exportXlsUrl: "/weituo/itdmWeituoInfo/exportXls",
  209. importExcelUrl: "weituo/itdmWeituoInfo/importExcel",
  210. },
  211. dictOptions:{},
  212. superFieldList:[],
  213. }
  214. },
  215. created() {
  216. this.getSuperFieldList();
  217. this.init()
  218. },
  219. computed: {
  220. importExcelUrl: function(){
  221. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  222. },
  223. },
  224. methods: {
  225. init(){
  226. getAction('/weituo/itdmWeituoInfo/distinctClientList', {}).then((res) => {
  227. if (res.success) {
  228. console.log(res.result)
  229. this.weituoClientList = res.result.map(i=>{
  230. return { value: i, text: i}
  231. })
  232. console.log(this.weituoClientList)
  233. }
  234. })
  235. },
  236. initDictConfig(){
  237. ajaxGetDictItems('weituo.bgyz').then((res) => {
  238. if (res.success) {
  239. console.log(res.result)
  240. this.$set(this.dictOptions, 'bgyz', res.result)
  241. }
  242. })
  243. ajaxGetDictItems('weituo.bgxs').then((res) => {
  244. if (res.success) {
  245. console.log(res.result)
  246. this.$set(this.dictOptions, 'bgxs', res.result)
  247. }
  248. })
  249. },
  250. getSuperFieldList(){
  251. let fieldList=[];
  252. fieldList.push({type:'string',value:'weituoClient',text:'委托单位名称',dictCode:''})
  253. fieldList.push({type:'string',value:'weituoAddress',text:'委托单位地址',dictCode:''})
  254. fieldList.push({type:'string',value:'weituoLxr',text:'委托联系人',dictCode:''})
  255. fieldList.push({type:'string',value:'weituoPhone',text:'委托电话',dictCode:''})
  256. fieldList.push({type:'string',value:'weituoEmail',text:'委托邮箱',dictCode:''})
  257. fieldList.push({type:'string',value:'bgyz',text:'报告用章'})
  258. fieldList.push({type:'string',value:'bgxs',text:'报告形式'})
  259. fieldList.push({type:'string',value:'teshuyaoqiu',text:'特殊要求',dictCode:''})
  260. fieldList.push({type:'string',value:'tiaojianFile',text:'试验条件文件地址',dictCode:''})
  261. fieldList.push({type:'string',value:'shenheMsg',text:'审核拒绝原因',dictCode:''})
  262. this.superFieldList = fieldList
  263. }
  264. }
  265. }
  266. </script>
  267. <style scoped>
  268. @import '~@assets/less/common.less';
  269. </style>