123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <div class="source pagePadding">
- <div
- v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
- v-loading="loading"
- >
- <el-row style="padding: 8px 0 10px 0">
- <el-col :span="4" style="width: 200px">
- <search-terrace
- :value="parmValue.platform_id"
- :disabled="false"
- :size="'mini'"
- :isDetail="false"
- :is_show="'0'"
- :placeholder="'业务平台'"
- @searchChange="platform_codesearchChange"
- />
- </el-col>
- </el-row>
- <el-table
- :data="tableData"
- style="width: 100%"
- border
- :size="size"
- stripe
- >
- <el-table-column label="序号" type="index"> </el-table-column>
- <el-table-column prop="platform_name" label="业务平台">
- </el-table-column>
- <el-table-column prop="source" label="销售渠道"> </el-table-column>
- </el-table>
- </div>
- <no-auth v-else></no-auth>
- </div>
- </template>
- <script>
- import asyncRequest from "@/apis/service/orderEntry/source";
- import { mapGetters } from "vuex";
- import resToken from "@/mixins/resToken";
- export default {
- name: "source",
- mixins: [resToken],
- computed: {
- //组件SIZE设置
- ...mapGetters(["tablebtnSize", "searchSize", "size"]),
- powers() {
- let tran =
- this.$store.getters.btnList.find(
- (item) => item.menu_route == "source"
- ) || {};
- if (tran && tran.action && tran.action.length > 0) {
- return tran.action;
- } else {
- return [];
- }
- },
- },
- data() {
- return {
- loading: true,
- parmValue: {
- platform_id: "",
- },
- tableData: [],
- };
- },
- mounted() {
- this.searchList();
- },
- methods: {
- restSearch() {
- this.parmValue = {
- platform_id: "",
- };
- this.searchList();
- },
- async platform_codesearchChange(e) {
- const { id } = e;
- this.parmValue.platform_id = id || "";
- await this.searchList();
- },
- // 刷新表格
- async searchList() {
- this.loading = true;
- const { code, data, message } = await asyncRequest.list(this.parmValue);
- if (code === 0) {
- this.tableData = data;
- } else if (code >= 100 && code <= 104) {
- await this.logout();
- } else {
- this.tableData = [];
- this.$message.warning(message);
- }
- this.loading = false;
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- </style>
|