ItdmWeituoshenheInfoList.vue 11 KB

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