{"remainingRequest":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/admin.ws.baibaodun.com.cn/src/views/onePass/smsTemplate/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/src/views/onePass/smsTemplate/index.vue","mtime":1701741776318},{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":1701741929501},{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":1701741918737},{"path":"/data/jenkins/workspace/admin.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":1701741928146}],"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// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]\n// +---------------------------------------------------------------------\n// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.\n// +---------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权\n// +---------------------------------------------------------------------\n// | Author: CRMEB Team \n// +---------------------------------------------------------------------\nimport { smsTempLstApi, tempCreateApi } from '@/api/sms';\nimport { roterPre } from '@/settings';\nimport { mapGetters } from 'vuex';\nimport zbParser from '@/components/FormGenerator/components/parser/ZBParser';\nimport { Debounce } from '@/utils/validate';\nexport default {\n name: 'SmsTemplate',\n components: { zbParser },\n filters: {\n statusFilter(status) {\n const statusMap = {\n 0: '不可用',\n 1: '可用',\n };\n return statusMap[status];\n },\n typesFilter(status) {\n const statusMap = {\n 1: '验证码',\n 2: '通知',\n 3: '推广',\n };\n return statusMap[status];\n },\n },\n data() {\n return {\n isCreate: 0,\n fullscreenLoading: false,\n listLoading: false,\n tableData: {\n data: [],\n total: 0,\n },\n tableFrom: {\n page: 1,\n limit: 20,\n },\n };\n },\n computed: {\n ...mapGetters(['isLogin']),\n },\n mounted() {\n if (!this.isLogin) {\n this.$router.push('/operation/onePass/index?url=' + this.$route.path);\n } else {\n this.getList();\n }\n },\n methods: {\n submit: Debounce(function (formValue) {\n tempCreateApi(formValue).then((data) => {\n this.$message.success('新增成功');\n this.$msgbox.close();\n this.getList();\n });\n }),\n add() {\n const _this = this;\n this.$modalParserFrom(\n '添加短信模板',\n '申请短信模板',\n 0,\n {},\n function (formValue) {\n _this.submit(formValue);\n },\n (this.keyNum += 1),\n );\n },\n // 查看是否登录\n onIsLogin() {\n this.fullscreenLoading = true;\n this.$store\n .dispatch('user/isLogin')\n .then(async (res) => {\n const data = res;\n if (!data.status) {\n this.$message.warning('请先登录');\n this.$router.push('/operation/onePass/index?url=' + this.$route.path);\n } else {\n this.getList();\n }\n this.fullscreenLoading = false;\n })\n .catch((res) => {\n this.$router.push('/operation/onePass/index?url=' + this.$route.path);\n this.fullscreenLoading = false;\n });\n },\n // 列表\n getList() {\n this.listLoading = true;\n smsTempLstApi(this.tableFrom)\n .then((res) => {\n this.tableData.data = res.data;\n this.tableData.total = res.count;\n this.listLoading = false;\n })\n .catch((res) => {\n this.listLoading = false;\n });\n },\n pageChange(page) {\n this.tableFrom.page = page;\n this.getList();\n },\n handleSizeChange(val) {\n this.tableFrom.limit = val;\n this.getList();\n },\n // 表格搜索\n userSearchs() {\n this.tableFrom.page = 1;\n this.getList();\n },\n },\n};\n",null]}