{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\mail\\mailLinkmanList.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\mail\\mailLinkmanList.vue","mtime":1667327529575},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport {mapState, mapActions} from 'vuex'\r\n\r\nexport default {\r\n name: 'mailLinkmanList',\r\n data() {\r\n var checkName = (rule, value, callback) => {\r\n var pattern = new RegExp(\r\n \"[`~!@#$%^&*()=|{}':;',\\\\[\\\\].<>《》/?~!@#¥……&*()——|{}【】‘;:”“'。,、? ]\"\r\n )\r\n if (value == '') {\r\n callback(new Error('请输入联系人名称'))\r\n } else if (pattern.test(value)) {\r\n callback(new Error('联系人名称包含特殊字符,请重新输入'))\r\n } else {\r\n callback()\r\n }\r\n }\r\n var checkphone = (rule, value, callback) => {\r\n const reg = /^1[3|4|5|7|8][0-9]\\d{8}$/\r\n if (value == '') {\r\n callback(new Error('请输入手机号'))\r\n } else if (!reg.test(value)) {\r\n callback(new Error('请输入正确的手机号!'))\r\n } else {\r\n callback()\r\n }\r\n }\r\n return {\r\n tableData: '',\r\n dialogFormVisible: false,\r\n fullscreenLoading: true,\r\n multipleSelection: [],\r\n formLabelWidth: '80px',\r\n data: {\r\n linkName: '',\r\n mailId: '',\r\n phone: ''\r\n },\r\n rules: {\r\n mailId: [\r\n {required: true, message: '请输入邮箱地址', trigger: 'blur'},\r\n {\r\n type: 'email',\r\n message: '请输入正确的邮箱地址',\r\n trigger: 'blur,change'\r\n }\r\n ],\r\n linkName: [{required: true, validator: checkName, trigger: 'blur'}],\r\n phone: [{required: true, validator: checkphone, trigger: 'blur'}]\r\n }\r\n }\r\n },\r\n computed: mapState({\r\n rows: state => state.mail.mailLinkmanRows,\r\n pagination: state => state.mail.mailLinkmanPagination,\r\n total: state => state.mail.mailLinkmanTotal,\r\n tree: state => state.mail.tree\r\n }),\r\n methods: {\r\n //回车查询\r\n searchEnterFun: function(e) {\r\n var keyCode = window.event ? e.keyCode : e.which\r\n if (keyCode == 13) {\r\n this.search('find')\r\n }\r\n },\r\n rowClick(row, column, event) {\r\n this.$refs.htTable.toggleRowSelection(row)\r\n },\r\n //Loading 加载中\r\n openFullScreen() {\r\n this.fullscreenLoading = true\r\n },\r\n handleSizeChange: function(size) {\r\n //每页下拉显示数据\r\n this.$store.dispatch('mail/setMailLinkmanPaginationSize', size)\r\n this.search()\r\n },\r\n handleCurrentChange: function(currentPage) {\r\n //点击第几页\r\n this.$store.dispatch('mail/setMailLinkmanPaginationPageNum', currentPage)\r\n this.search()\r\n },\r\n search(str) {\r\n this.openFullScreen()\r\n if (str == 'find') {\r\n this.$store.dispatch('mail/setMailLinkmanPaginationPageNum', 1)\r\n }\r\n let querys = [] //查询条件\r\n let queryFilter = {}\r\n let pageBean = {pageBean: this.pagination}\r\n if (this.tableData == '') {\r\n this.$store\r\n .dispatch('mail/getMailLinkmanByPagination', pageBean)\r\n .then(() => {\r\n this.fullscreenLoading = false\r\n })\r\n } else if (this.tableData != '') {\r\n querys = [\r\n {\r\n property: 'linkName',\r\n value: this.tableData,\r\n group: 'main',\r\n operation: 'LIKE',\r\n relation: 'OR'\r\n },\r\n {\r\n property: 'mailId',\r\n value: this.tableData,\r\n group: 'main',\r\n operation: 'LIKE',\r\n relation: 'OR'\r\n }\r\n ]\r\n queryFilter = {pageBean: this.pagination, querys}\r\n this.$store\r\n .dispatch('mail/getMailLinkmanByPagination', queryFilter)\r\n .then(() => {\r\n this.fullscreenLoading = false\r\n })\r\n }\r\n },\r\n handleSelectionChange(val) {\r\n this.multipleSelection = val\r\n },\r\n deleted() {\r\n if (\r\n this.multipleSelection == null ||\r\n this.multipleSelection.length == 0\r\n ) {\r\n this.$message.warning('请选择联系人删除!')\r\n return false\r\n }\r\n this.$confirm('此操作将删除该联系人, 是否继续?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n this.$store\r\n .dispatch('mail/deleteMaliLinkmanById', this.multipleSelection)\r\n .then(() => {\r\n this.search()\r\n })\r\n })\r\n .catch(() => {\r\n this.$message({\r\n type: 'info',\r\n message: '已取消删除'\r\n })\r\n })\r\n },\r\n operating(id, action) {\r\n if (action == 'add') {\r\n this.$router.push('/mail/linkmanAdd')\r\n } else if (action == 'edit') {\r\n this.$router.push('/mail/linkmanEdit/' + id)\r\n } else {\r\n this.$router.push('/mail/linkmanGet/' + id)\r\n }\r\n },\r\n submitForm(data) {\r\n this.$refs[data].validate(valid => {\r\n if (valid) {\r\n this.$store.dispatch('mail/saveMailLinkman', this.data).then(() => {\r\n this.data = {\r\n linkName: '',\r\n mailId: '',\r\n phone: ''\r\n }\r\n this.dialogFormVisible = false\r\n this.search()\r\n })\r\n } else {\r\n this.$message.warning('您输入表单信息有误,请重新填写!')\r\n return false\r\n }\r\n })\r\n },\r\n openDialog() {\r\n this.data = {\r\n linkName: '',\r\n mailId: '',\r\n phone: ''\r\n }\r\n this.dialogFormVisible = true\r\n },\r\n cancel() {\r\n this.data = {}\r\n this.dialogFormVisible = false\r\n }\r\n },\r\n created() {\r\n let pageBean = {pageBean: {page: '1', pageSize: '10', showTotal: 'true'}} //初次加载默认pageBean\r\n this.$store\r\n .dispatch('mail/getMailLinkmanByPagination', pageBean)\r\n .then(() => {\r\n this.fullscreenLoading = false\r\n })\r\n }\r\n}\r\n",null]}