employeeInfo.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
  5. <div class="search">
  6. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  7. <el-button type="primary" @click="outexl">导出</el-button>
  8. </div>
  9. <div class="tabbox">
  10. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  11. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading" >
  12. <!-- <el-table-column type="selection" width="55">
  13. </el-table-column> -->
  14. <!-- <el-table-column prop="regionName" label="地市公司名称">
  15. </el-table-column>
  16. <el-table-column prop="areaName" label="区县名称">
  17. </el-table-column> -->
  18. <el-table-column prop="fillName" label="员工姓名">
  19. </el-table-column>
  20. <el-table-column prop="memberName" label="成员姓名">
  21. <template slot-scope="scope">
  22. {{$desensitization(scope.row.memberName,1)}}
  23. </template>
  24. </el-table-column>
  25. <el-table-column prop="memberRelation" label="成员关系">
  26. </el-table-column>
  27. <!-- <el-table-column prop="bornDate" label="成员出生日期">
  28. </el-table-column> -->
  29. <el-table-column prop="memberSex" label="成员性别">
  30. </el-table-column>
  31. <el-table-column prop="idCard" label="成员身份证号">
  32. <template slot-scope="scope">
  33. {{$desensitization(scope.row.idCard,3)}}
  34. </template>
  35. </el-table-column>
  36. <!-- <el-table-column prop="memberEdu" label="成员学历">
  37. </el-table-column>
  38. <el-table-column prop="partyGroup" label="成员政治面貌">
  39. </el-table-column>
  40. <el-table-column prop="memberNation" label="成员民族信息">
  41. </el-table-column>
  42. <el-table-column prop="workUnit" label="成员工作单位">
  43. </el-table-column>
  44. <el-table-column prop="workDuty" label="成员职位职务">
  45. </el-table-column>
  46. <el-table-column prop="emerContact" label="是否为紧急联系人">
  47. </el-table-column>
  48. <el-table-column prop="memberTel" label="成员联系电话">
  49. <template slot-scope="scope">
  50. {{$desensitization(scope.row.memberTel,2)}}
  51. </template>
  52. </el-table-column>
  53. <el-table-column prop="interiorStaff" label="是否移动系统内工作">
  54. </el-table-column>
  55. <el-table-column prop="staffName" label="系统内员工">
  56. </el-table-column>
  57. <el-table-column prop="isMove" label="是否移居海外">
  58. </el-table-column>
  59. <el-table-column prop="immiType" label="移居类型">
  60. </el-table-column>
  61. <el-table-column prop="memberAddress" label="成员联系地址">
  62. </el-table-column> -->
  63. </el-table>
  64. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  65. :total="total">
  66. </el-pagination>
  67. </div>
  68. </div>
  69. </fullscreen>
  70. </template>
  71. <script>
  72. import mySearch from "../../../components/search.vue";
  73. import myMessage from "../../../components/myMessage.vue"
  74. import toolList from '../../../components/toolList'
  75. export default {
  76. components: {
  77. mySearch,
  78. myMessage,
  79. toolList
  80. },
  81. data() {
  82. const supplierName = (rule, value, callback) => {
  83. if (!this.infolist.supplierName) {
  84. callback(new Error('不能为空'))
  85. } else {
  86. callback()
  87. }
  88. }
  89. return {
  90. rules: {
  91. supplierName: [{
  92. required: true,
  93. trigger: 'blur',
  94. validator: supplierName
  95. }],
  96. },
  97. searchList: [
  98. {
  99. type: 'input',
  100. tit: '人员名称',
  101. value: '',
  102. width: '98%',
  103. }
  104. ],
  105. tooltit:'进度跟踪',
  106. fullscreen: false,
  107. total: 0,
  108. pageSize: 1,
  109. tableData: [{}],
  110. dialogStatus: false,
  111. disableStatus: false,
  112. titname: '',
  113. infolist: {},
  114. userInfo: {},
  115. params: {},
  116. centerDialogVisible: false,
  117. messTit: '',
  118. delid: '',
  119. loading:false,
  120. loadinged:false,
  121. memberFamilyBtnShow: "",
  122. }
  123. },
  124. methods: {
  125. outexl(){
  126. let url = '/market/cMemberWo/excelExportDetailSummary';
  127. let paramsf = {};
  128. if(this.memberFamilyBtnShow && (this.memberFamilyBtnShow == "1")){
  129. paramsf.areaName = this.$route.query.regionName
  130. }else{
  131. paramsf.regionName = this.$route.query.regionName
  132. }
  133. this.$http({
  134. url: url,
  135. method: "post",
  136. responseType: 'blob',
  137. headers: {
  138. "Content-Type": "application/json",
  139. },
  140. data: paramsf,
  141. }).then((response) => {
  142. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  143. let blob = new Blob([response.data], {
  144. type: response.data.type
  145. });
  146. window.navigator.msSaveOrOpenBlob(blob, 'adv.xlsx');
  147. } else {
  148. /* 火狐谷歌的文件下载方式 */
  149. console.log(response.data.type)
  150. var blob = new Blob([response.data])
  151. var downloadElement = document.createElement('a')
  152. var href = window.URL.createObjectURL(blob);
  153. downloadElement.href = href;
  154. downloadElement.download = 'adv.xlsx';
  155. document.body.appendChild(downloadElement);
  156. downloadElement.click();
  157. document.body.removeChild(downloadElement);
  158. window.URL.revokeObjectURL(href);
  159. }
  160. });
  161. },
  162. handleSelectionChange(val) {
  163. // console.log(val)
  164. },
  165. jumpjd(){
  166. this.$router.push({
  167. path: "/speedOfProgress",
  168. });
  169. this.setabList("进度跟踪", "/speedOfProgress");
  170. },
  171. setabList(n, p) {
  172. let params = {
  173. children: "",
  174. name: n,
  175. rountPath: p,
  176. target: "_self",
  177. };
  178. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  179. if (this.$store.state.tabList[i].name === params.name) {
  180. this.$store.state.tabList[i] = params;
  181. }
  182. }
  183. let set = new Set([...this.$store.state.tabList, params]);
  184. set.add(params);
  185. this.$store.commit("setDefaultActive", params.rountPath);
  186. this.$store.commit("setTabList", Array.from(set));
  187. },
  188. closedia() {
  189. this.infolist = {};
  190. this.dialogStatus = false;
  191. },
  192. //搜索数据
  193. searchInfo(v) {
  194. this.params = {};
  195. v[0] ? this.params.fillName = v[0] : '';
  196. this.getList(this.params, this.pageSize);
  197. },
  198. //获取列表
  199. getList(v, n) {
  200. this.pageSize = n;
  201. let _this = this;
  202. this.loading = true;
  203. this.tableData = [];
  204. v.areaName = this.$route.query.regionName;
  205. v.isShow = 0;
  206. var memberFamilyBtnShow = JSON.parse(window.sessionStorage.memberFamilyBtnShow)
  207. v.showButton = memberFamilyBtnShow
  208. this.$http({
  209. url: "/market/cMemberWo/queryMkMemberFillDetailSummaryPage",
  210. method: "post",
  211. headers: {
  212. "Content-Type": "application/json",
  213. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  214. },
  215. data: v,
  216. }).then((res) => {
  217. this.tableData = res.data.data;
  218. this.total = res.data.totalRecord;
  219. this.loading = false;
  220. });
  221. },
  222. // 分页
  223. currchange(v) {
  224. this.pageSize = v;
  225. this.getList(this.params, this.pageSize);
  226. },
  227. //申请
  228. dialogCheck(v, n) {
  229. this.dialogStatus = true;
  230. this.infolist = Object.assign({}, n);
  231. if (v === 1) {
  232. this.titname = '查看';
  233. this.disableStatus = true;
  234. return
  235. } else if (v === 2) {
  236. this.titname = '修改';
  237. this.disableStatus = false;
  238. } else if (v === 3) {
  239. this.titname = '添加';
  240. this.disableStatus = false;
  241. }
  242. this.infolist.opNo = this.userInfo.loginNo;
  243. this.infolist.opName = this.userInfo.loginName;
  244. },
  245. //添加
  246. dialogCli(v) {
  247. if (v === 1) {
  248. this.infolist = {};
  249. this.dialogStatus = false;
  250. return
  251. } else {
  252. this.infolist.opTime = this.$formatDate(new Date(), "YYYY-MM-DD");
  253. this.infolist.endTime = this.$formatDate(this.infolist.endTime, "YYYY-MM-DD");
  254. if (this.titname === '添加') {
  255. this.submitInfo("/market/cAdvPubSupplier/add");
  256. } else if (this.titname === '修改') {
  257. this.submitInfo("/market/cAdvPubSupplier/update", v);
  258. }
  259. }
  260. },
  261. submitInfo(u) {
  262. let _this = this;
  263. this.$refs.infolist.validate(valid => {
  264. if (valid) {
  265. this.loadinged = true;
  266. this.$http({
  267. url: u,
  268. method: "post",
  269. headers: {
  270. "Content-Type": "application/json",
  271. },
  272. data: this.infolist,
  273. }).then((res) => {
  274. this.loadinged = false;
  275. if (res.data.result === 1) {
  276. _this.$message({
  277. message: res.data.desc,
  278. type: 'error'
  279. });
  280. } else {
  281. _this.$message({
  282. message: '成功',
  283. type: 'success'
  284. });
  285. _this.infolist = {};
  286. _this.dialogStatus = false;
  287. _this.getList({}, _this.pageSize);
  288. }
  289. });
  290. }
  291. })
  292. },
  293. closeMessage(v) {
  294. this.centerDialogVisible = false;
  295. let _this = this;
  296. if (v === 1) {
  297. _this.$http({
  298. url: "/market/cAdvPubSupplier/del",
  299. method: "post",
  300. headers: {
  301. "Content-Type": "application/json",
  302. },
  303. data: {
  304. id: this.delid
  305. },
  306. }).then((res) => {
  307. if (res.data.result === 1) {
  308. _this.$message({
  309. message: res.data.desc,
  310. type: 'error'
  311. });
  312. } else {
  313. _this.$message({
  314. message: '删除成功',
  315. type: 'success'
  316. });
  317. _this.getList(this.params, this.pageSize);
  318. }
  319. });
  320. }
  321. },
  322. //删除
  323. delLine(v) {
  324. this.centerDialogVisible = true;
  325. this.messTit = '即将删除此条数据, 是否删除?';
  326. this.delid = v.id;
  327. },
  328. //文件返回值
  329. uploadBack(v) {
  330. console.log(v)
  331. },
  332. //功能栏
  333. iconCli(v) {
  334. if (v === 1) {
  335. this.getList(this.params, this.pageSize);
  336. }
  337. if (v === 2) {
  338. this.fullscreen = !this.fullscreen
  339. }
  340. },
  341. getUser() {
  342. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  343. }
  344. },
  345. mounted() {
  346. this.getList({}, 1);
  347. this.getUser();
  348. this.memberFamilyBtnShow = JSON.parse(window.sessionStorage.memberFamilyBtnShow)
  349. },
  350. created() {
  351. }
  352. }
  353. </script>
  354. <style scoped lang="scss">
  355. .onetab {
  356. margin-bottom: 20px;
  357. padding: 0 20px;
  358. }
  359. .titbox {
  360. div {
  361. float: right;
  362. i {
  363. font-size: 22px;
  364. margin-left: 20px;
  365. cursor: pointer;
  366. }
  367. }
  368. }
  369. .tabbox {
  370. margin-top: 15px;
  371. }
  372. .pageBox {
  373. text-align: right;
  374. margin-top: 10px;
  375. }
  376. .info-line {
  377. width: 100%;
  378. display: block;
  379. padding-left: 20px;
  380. div {
  381. width: 50%;
  382. display: inline-block;
  383. }
  384. span {
  385. width: 80px;
  386. display: inline-block;
  387. text-align: left;
  388. i {
  389. color: red;
  390. display: inline-block;
  391. padding-right: 5px;
  392. }
  393. }
  394. .el-select,
  395. .el-input {
  396. width: calc(100% - 100px);
  397. }
  398. }
  399. .online {
  400. width: 100%;
  401. .el-select {
  402. width: calc(100% - 100px);
  403. }
  404. span {
  405. vertical-align: top;
  406. }
  407. .el-textarea {
  408. width: calc(100% - 100px);
  409. }
  410. }
  411. </style>