employeeInfo.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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. }
  122. },
  123. methods: {
  124. outexl(){
  125. let url = '/market/cMemberWo/excelExportDetailSummary';
  126. let paramsf = {areaName:this.$route.query.regionName};
  127. this.$http({
  128. url: url,
  129. method: "post",
  130. responseType: 'blob',
  131. headers: {
  132. "Content-Type": "application/json",
  133. },
  134. data: paramsf,
  135. }).then((response) => {
  136. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  137. let blob = new Blob([response.data], {
  138. type: response.data.type
  139. });
  140. window.navigator.msSaveOrOpenBlob(blob, 'adv.xlsx');
  141. } else {
  142. /* 火狐谷歌的文件下载方式 */
  143. console.log(response.data.type)
  144. var blob = new Blob([response.data])
  145. var downloadElement = document.createElement('a')
  146. var href = window.URL.createObjectURL(blob);
  147. downloadElement.href = href;
  148. downloadElement.download = 'adv.xlsx';
  149. document.body.appendChild(downloadElement);
  150. downloadElement.click();
  151. document.body.removeChild(downloadElement);
  152. window.URL.revokeObjectURL(href);
  153. }
  154. });
  155. },
  156. handleSelectionChange(val) {
  157. // console.log(val)
  158. },
  159. jumpjd(){
  160. this.$router.push({
  161. path: "/speedOfProgress",
  162. });
  163. this.setabList("进度跟踪", "/speedOfProgress");
  164. },
  165. setabList(n, p) {
  166. let params = {
  167. children: "",
  168. name: n,
  169. rountPath: p,
  170. target: "_self",
  171. };
  172. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  173. if (this.$store.state.tabList[i].name === params.name) {
  174. this.$store.state.tabList[i] = params;
  175. }
  176. }
  177. let set = new Set([...this.$store.state.tabList, params]);
  178. set.add(params);
  179. this.$store.commit("setDefaultActive", params.rountPath);
  180. this.$store.commit("setTabList", Array.from(set));
  181. },
  182. closedia() {
  183. this.infolist = {};
  184. this.dialogStatus = false;
  185. },
  186. //搜索数据
  187. searchInfo(v) {
  188. this.params = {};
  189. v[0] ? this.params.fillName = v[0] : '';
  190. this.getList(this.params, this.pageSize);
  191. },
  192. //获取列表
  193. getList(v, n) {
  194. this.pageSize = n;
  195. let _this = this;
  196. this.loading = true;
  197. this.tableData = [];
  198. v.areaName = this.$route.query.regionName
  199. v.isShow = 0
  200. this.$http({
  201. url: "/market/cMemberWo/queryMkMemberFillDetailSummaryPage",
  202. method: "post",
  203. headers: {
  204. "Content-Type": "application/json",
  205. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  206. },
  207. data: v,
  208. }).then((res) => {
  209. this.tableData = res.data.data;
  210. this.total = res.data.totalRecord;
  211. this.loading = false;
  212. });
  213. },
  214. // 分页
  215. currchange(v) {
  216. this.pageSize = v;
  217. this.getList(this.params, this.pageSize);
  218. },
  219. //申请
  220. dialogCheck(v, n) {
  221. this.dialogStatus = true;
  222. this.infolist = Object.assign({}, n);
  223. if (v === 1) {
  224. this.titname = '查看';
  225. this.disableStatus = true;
  226. return
  227. } else if (v === 2) {
  228. this.titname = '修改';
  229. this.disableStatus = false;
  230. } else if (v === 3) {
  231. this.titname = '添加';
  232. this.disableStatus = false;
  233. }
  234. this.infolist.opNo = this.userInfo.loginNo;
  235. this.infolist.opName = this.userInfo.loginName;
  236. },
  237. //添加
  238. dialogCli(v) {
  239. if (v === 1) {
  240. this.infolist = {};
  241. this.dialogStatus = false;
  242. return
  243. } else {
  244. this.infolist.opTime = this.$formatDate(new Date(), "YYYY-MM-DD");
  245. this.infolist.endTime = this.$formatDate(this.infolist.endTime, "YYYY-MM-DD");
  246. if (this.titname === '添加') {
  247. this.submitInfo("/market/cAdvPubSupplier/add");
  248. } else if (this.titname === '修改') {
  249. this.submitInfo("/market/cAdvPubSupplier/update", v);
  250. }
  251. }
  252. },
  253. submitInfo(u) {
  254. let _this = this;
  255. this.$refs.infolist.validate(valid => {
  256. if (valid) {
  257. this.loadinged = true;
  258. this.$http({
  259. url: u,
  260. method: "post",
  261. headers: {
  262. "Content-Type": "application/json",
  263. },
  264. data: this.infolist,
  265. }).then((res) => {
  266. this.loadinged = false;
  267. if (res.data.result === 1) {
  268. _this.$message({
  269. message: res.data.desc,
  270. type: 'error'
  271. });
  272. } else {
  273. _this.$message({
  274. message: '成功',
  275. type: 'success'
  276. });
  277. _this.infolist = {};
  278. _this.dialogStatus = false;
  279. _this.getList({}, _this.pageSize);
  280. }
  281. });
  282. }
  283. })
  284. },
  285. closeMessage(v) {
  286. this.centerDialogVisible = false;
  287. let _this = this;
  288. if (v === 1) {
  289. _this.$http({
  290. url: "/market/cAdvPubSupplier/del",
  291. method: "post",
  292. headers: {
  293. "Content-Type": "application/json",
  294. },
  295. data: {
  296. id: this.delid
  297. },
  298. }).then((res) => {
  299. if (res.data.result === 1) {
  300. _this.$message({
  301. message: res.data.desc,
  302. type: 'error'
  303. });
  304. } else {
  305. _this.$message({
  306. message: '删除成功',
  307. type: 'success'
  308. });
  309. _this.getList(this.params, this.pageSize);
  310. }
  311. });
  312. }
  313. },
  314. //删除
  315. delLine(v) {
  316. this.centerDialogVisible = true;
  317. this.messTit = '即将删除此条数据, 是否删除?';
  318. this.delid = v.id;
  319. },
  320. //文件返回值
  321. uploadBack(v) {
  322. console.log(v)
  323. },
  324. //功能栏
  325. iconCli(v) {
  326. if (v === 1) {
  327. this.getList(this.params, this.pageSize);
  328. }
  329. if (v === 2) {
  330. this.fullscreen = !this.fullscreen
  331. }
  332. },
  333. getUser() {
  334. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  335. }
  336. },
  337. mounted() {
  338. this.getList({}, 1);
  339. this.getUser();
  340. },
  341. created() {
  342. }
  343. }
  344. </script>
  345. <style scoped lang="scss">
  346. .onetab {
  347. margin-bottom: 20px;
  348. padding: 0 20px;
  349. }
  350. .titbox {
  351. div {
  352. float: right;
  353. i {
  354. font-size: 22px;
  355. margin-left: 20px;
  356. cursor: pointer;
  357. }
  358. }
  359. }
  360. .tabbox {
  361. margin-top: 15px;
  362. }
  363. .pageBox {
  364. text-align: right;
  365. margin-top: 10px;
  366. }
  367. .info-line {
  368. width: 100%;
  369. display: block;
  370. padding-left: 20px;
  371. div {
  372. width: 50%;
  373. display: inline-block;
  374. }
  375. span {
  376. width: 80px;
  377. display: inline-block;
  378. text-align: left;
  379. i {
  380. color: red;
  381. display: inline-block;
  382. padding-right: 5px;
  383. }
  384. }
  385. .el-select,
  386. .el-input {
  387. width: calc(100% - 100px);
  388. }
  389. }
  390. .online {
  391. width: 100%;
  392. .el-select {
  393. width: calc(100% - 100px);
  394. }
  395. span {
  396. vertical-align: top;
  397. }
  398. .el-textarea {
  399. width: calc(100% - 100px);
  400. }
  401. }
  402. </style>