From f2a2b4a4258cc1c88b897024bc5c49f31273c0ca Mon Sep 17 00:00:00 2001 From: jazzzone <312142485@qq.com> Date: 星期六, 05 三月 2022 22:39:11 +0800 Subject: [PATCH] update_202203052238_添加取消批次和下载模板 --- src/pages/index/index.vue | 39 ++++++++++++++++++++++++--------------- src/router/index.js | 4 ++-- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 5c50dc9..552725b 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -30,6 +30,7 @@ <el-form-item> <el-button type="cyan" icon="el-icon-search" size="mini" @click="reGetList">鎼滅储</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetHandle">閲嶇疆</el-button> + <el-button type="primary" icon="el-icon-download" size="mini" @click="exportList">涓嬭浇鍙戦�佹ā鏉�</el-button> </el-form-item> </el-form> <!-- 鎼滅储鍖� 鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈 --> @@ -67,11 +68,11 @@ <el-table-column label="鍙戦�佹�绘暟" prop="sendTotal" align="center" /> <el-table-column label="鐘舵��" prop="status" align="center"> <template slot-scope="scope"> - <span v-if="scope.row.isUp == 0">寰呮墽琛�</span> - <span v-if="scope.row.isUp == 1">鎵ц涓�</span> - <span v-if="scope.row.isUp == 2">瀹屾垚</span> - <span v-if="scope.row.isUp == 3">鍙栨秷</span> - <span v-if="scope.row.isUp == 4">澶辫触</span> + <span v-if="scope.row.status == 0">寰呮墽琛�</span> + <span v-if="scope.row.status == 1">鎵ц涓�</span> + <span v-if="scope.row.status == 2">瀹屾垚</span> + <span v-if="scope.row.status == 3">鍙栨秷</span> + <span v-if="scope.row.status == 4">澶辫触</span> </template> </el-table-column> <el-table-column label="鐭俊妯″唴瀹�" prop="smsTemplate" align="center" min-width="160"> @@ -98,22 +99,22 @@ /> </template> </el-table-column> --> - <!-- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="120"> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="120"> <template slot-scope="scope"> - <el-button + <!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="showEditDialog(scope.row)" - >缂栬緫</el-button> + >缂栬緫</el-button> --> <el-button size="mini" type="text warn" icon="el-icon-delete" @click="handleDelete(scope.row)" - >鍒犻櫎</el-button> + >鍙栨秷鎵规</el-button> </template> - </el-table-column> --> + </el-table-column> </el-table> <!-- 鏂板&缂栬緫 --> @@ -171,6 +172,7 @@ <script> import BackToTop from '@/components/BackToTop' +import { getToken } from '@/utils/auth' // get token from session // import WangEnduit from '@/components/WangEnduit' // 瀵屾枃鏈� export default { name: 'Index', @@ -293,15 +295,15 @@ // 鍒犻櫎 handleDelete(item) { // 鎵撳紑浜屾纭寮圭獥 - this.$confirm('鏄惁纭鍒犻櫎璇�' + this.objectName + '?', '鎻愮ず', { + this.$confirm('鏄惁纭鍙栨秷璇ョ煭淇℃壒娆�?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { // 纭畾鍥炶皟 - // TODO url this.postFN({ - url: 'xxx', + url: 'send-general/cancel', + header: { 'Content-Type': 'application/json;charset=UTF-8' }, params: { id: item.id }, @@ -312,7 +314,7 @@ } }, () => { this.getList() - this.$messageSuc('鍒犻櫎鎴愬姛') + this.$messageSuc('鍙栨秷鎴愬姛') }) }).catch(() => {}) }, @@ -497,8 +499,15 @@ const a = filename.split('').reverse().join('') const b = a.substring(0, a.search(/\./)).split('').reverse().join('') return b - } + }, // 涓婁紶鏂囦欢 鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈 + // 瀵煎嚭鍒楄〃 + exportList() { + var adminToken = getToken() + const path = `${window.location.protocol}//${window.location.host}/sms/send-general/get/temp?adminToken=${adminToken}` + console.log('path', path) + window.location.href = path + } } } </script> diff --git a/src/router/index.js b/src/router/index.js index d877e9c..2c5a36e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,7 +6,7 @@ /* Layout */ import Layout from '@/layout' -import demo_router from './demo_router' +// import demo_router from './demo_router' import sms_router from './sms_router' // import system_router from './system_router' // import op_router from './op_router' @@ -63,7 +63,7 @@ // system_router, sms_router, - demo_router, + // demo_router, // agreement_router, // { -- Gitblit v1.8.0