ItdmPersonManageList.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. <a-input placeholder="请输入人员姓名" v-model="queryParam.name"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <a-form-item label="人员性别">
  14. <j-dict-select-tag placeholder="请选择人员性别" v-model="queryParam.sex" dictCode="sex"/>
  15. </a-form-item>
  16. </a-col>
  17. <template v-if="toggleSearchStatus">
  18. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19. <a-form-item label="所属部门">
  20. <a-input placeholder="请输入所属部门" v-model="queryParam.sysOrgCode"></a-input>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24. <a-form-item label="职位">
  25. <a-input placeholder="请输入职位" v-model="queryParam.position"></a-input>
  26. </a-form-item>
  27. </a-col>
  28. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  29. <a-form-item label="工作组">
  30. <a-input placeholder="请输入工作组" v-model="queryParam.workGroup"></a-input>
  31. </a-form-item>
  32. </a-col>
  33. </template>
  34. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  35. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  36. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  37. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  38. <a @click="handleToggleSearch" style="margin-left: 8px">
  39. {{ toggleSearchStatus ? '收起' : '展开' }}
  40. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  41. </a>
  42. </span>
  43. </a-col>
  44. </a-row>
  45. </a-form>
  46. </div>
  47. <!-- 查询区域-END -->
  48. <!-- 操作按钮区域 -->
  49. <div class="table-operator">
  50. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  51. <a-button type="primary" icon="download" @click="handleExportXls('人员管理')">导出</a-button>
  52. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  53. <a-button type="primary" icon="import">导入</a-button>
  54. </a-upload>
  55. <!-- 高级查询区域 -->
  56. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  57. <a-dropdown v-if="selectedRowKeys.length > 0">
  58. <a-menu slot="overlay">
  59. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  60. </a-menu>
  61. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  62. </a-dropdown>
  63. </div>
  64. <!-- table区域-begin -->
  65. <div>
  66. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  67. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  68. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  69. </div>
  70. <a-table
  71. ref="table"
  72. size="middle"
  73. :scroll="{x:true}"
  74. bordered
  75. rowKey="id"
  76. :columns="columns"
  77. :dataSource="dataSource"
  78. :pagination="ipagination"
  79. :loading="loading"
  80. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  81. class="j-table-force-nowrap"
  82. @change="handleTableChange">
  83. <template slot="htmlSlot" slot-scope="text">
  84. <div v-html="text"></div>
  85. </template>
  86. <template slot="imgSlot" slot-scope="text,record">
  87. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  88. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  89. </template>
  90. <template slot="fileSlot" slot-scope="text">
  91. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  92. <a-button
  93. v-else
  94. :ghost="true"
  95. type="primary"
  96. icon="download"
  97. size="small"
  98. @click="downloadFile(text)">
  99. 下载
  100. </a-button>
  101. </template>
  102. <span slot="action" slot-scope="text, record">
  103. <a @click="handleEdit(record)">编辑</a>
  104. <a-divider type="vertical" />
  105. <a-dropdown>
  106. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  107. <a-menu slot="overlay">
  108. <a-menu-item>
  109. <a @click="handleDetail(record)">详情</a>
  110. </a-menu-item>
  111. <a-menu-item>
  112. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  113. <a>删除</a>
  114. </a-popconfirm>
  115. </a-menu-item>
  116. </a-menu>
  117. </a-dropdown>
  118. </span>
  119. </a-table>
  120. </div>
  121. <itdm-person-manage-modal ref="modalForm" @ok="modalFormOk"></itdm-person-manage-modal>
  122. </a-card>
  123. </template>
  124. <script>
  125. import '@/assets/less/TableExpand.less'
  126. import { mixinDevice } from '@/utils/mixin'
  127. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  128. import ItdmPersonManageModal from './modules/ItdmPersonManageModal'
  129. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  130. export default {
  131. name: 'ItdmPersonManageList',
  132. mixins:[JeecgListMixin, mixinDevice],
  133. components: {
  134. ItdmPersonManageModal
  135. },
  136. data () {
  137. return {
  138. description: '人员管理管理页面',
  139. // 表头
  140. columns: [
  141. {
  142. title: '#',
  143. dataIndex: '',
  144. key:'rowIndex',
  145. width:60,
  146. align:"center",
  147. customRender:function (t,r,index) {
  148. return parseInt(index)+1;
  149. }
  150. },
  151. {
  152. title:'人员姓名',
  153. align:"center",
  154. dataIndex: 'name'
  155. },
  156. {
  157. title:'人员性别',
  158. align:"center",
  159. dataIndex: 'sex_dictText'
  160. },
  161. {
  162. title:'所属部门',
  163. align:"center",
  164. dataIndex: 'sysOrgCode'
  165. },
  166. {
  167. title:'职位',
  168. align:"center",
  169. dataIndex: 'position'
  170. },
  171. {
  172. title:'工作组',
  173. align:"center",
  174. dataIndex: 'workGroup'
  175. },
  176. {
  177. title:'手机号',
  178. align:"center",
  179. dataIndex: 'tel'
  180. },
  181. {
  182. title:'备注',
  183. align:"center",
  184. dataIndex: 'remark'
  185. },
  186. {
  187. title: '操作',
  188. dataIndex: 'action',
  189. align:"center",
  190. fixed:"right",
  191. width:147,
  192. scopedSlots: { customRender: 'action' }
  193. }
  194. ],
  195. url: {
  196. list: "/itdmPersonManage/itdmPersonManage/list",
  197. delete: "/itdmPersonManage/itdmPersonManage/delete",
  198. deleteBatch: "/itdmPersonManage/itdmPersonManage/deleteBatch",
  199. exportXlsUrl: "/itdmPersonManage/itdmPersonManage/exportXls",
  200. importExcelUrl: "itdmPersonManage/itdmPersonManage/importExcel",
  201. },
  202. dictOptions:{},
  203. superFieldList:[],
  204. }
  205. },
  206. created() {
  207. this.getSuperFieldList();
  208. },
  209. computed: {
  210. importExcelUrl: function(){
  211. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  212. },
  213. },
  214. methods: {
  215. initDictConfig(){
  216. },
  217. getSuperFieldList(){
  218. let fieldList=[];
  219. fieldList.push({type:'string',value:'name',text:'人员姓名',dictCode:''})
  220. fieldList.push({type:'string',value:'sex',text:'人员性别',dictCode:'sex'})
  221. fieldList.push({type:'string',value:'sysOrgCode',text:'所属部门',dictCode:''})
  222. fieldList.push({type:'string',value:'position',text:'职位',dictCode:''})
  223. fieldList.push({type:'string',value:'workGroup',text:'工作组',dictCode:''})
  224. fieldList.push({type:'string',value:'tel',text:'手机号',dictCode:''})
  225. fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
  226. this.superFieldList = fieldList
  227. }
  228. }
  229. }
  230. </script>
  231. <style scoped>
  232. @import '~@assets/less/common.less';
  233. </style>