|
@@ -143,20 +143,15 @@
|
|
|
<ElOption v-for="item in phoneList" :key="item.id" :label="item.name" :value="item.id" />
|
|
<ElOption v-for="item in phoneList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</ElSelect>
|
|
</ElSelect>
|
|
|
</ElFormItem>
|
|
</ElFormItem>
|
|
|
- <ElFormItem v-if="isAdmin" prop="channels" label="渠道列表">
|
|
|
|
|
|
|
+ <ElFormItem v-if="isAdmin" prop="country" label="国家列表">
|
|
|
<ElSelect
|
|
<ElSelect
|
|
|
- v-model="model.channels"
|
|
|
|
|
|
|
+ v-model="model.country"
|
|
|
multiple
|
|
multiple
|
|
|
- placeholder="请选择渠道列表"
|
|
|
|
|
|
|
+ placeholder="请选择国家列表"
|
|
|
:collapse-tags="true"
|
|
:collapse-tags="true"
|
|
|
:collapse-tags-tooltip="true"
|
|
:collapse-tags-tooltip="true"
|
|
|
>
|
|
>
|
|
|
- <ElOption
|
|
|
|
|
- v-for="item in operatorList"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :label="item.mcc + '-' + item.mnc + '-' + item.country + '-' + item.operator"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <ElOption v-for="item in countryList" :key="item" :value="item" />
|
|
|
</ElSelect>
|
|
</ElSelect>
|
|
|
</ElFormItem>
|
|
</ElFormItem>
|
|
|
<ElFormItem prop="message" label="内容" v-if="!model.id" class="!w-full">
|
|
<ElFormItem prop="message" label="内容" v-if="!model.id" class="!w-full">
|
|
@@ -253,7 +248,7 @@
|
|
|
</EditDialog>
|
|
</EditDialog>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { computed, inject, ref } from 'vue'
|
|
|
|
|
|
|
+import { computed, inject, ref, onMounted } from 'vue'
|
|
|
import PagingTable from '@/components/PagingTable.vue'
|
|
import PagingTable from '@/components/PagingTable.vue'
|
|
|
import { useTimeFormatter } from '@/utils/formatter'
|
|
import { useTimeFormatter } from '@/utils/formatter'
|
|
|
import { Plus, Refresh, Trash } from '@vicons/tabler'
|
|
import { Plus, Refresh, Trash } from '@vicons/tabler'
|
|
@@ -287,6 +282,13 @@ const rules = {
|
|
|
}
|
|
}
|
|
|
const { showEditDialog, onEdit } = setupEditDialog(model)
|
|
const { showEditDialog, onEdit } = setupEditDialog(model)
|
|
|
|
|
|
|
|
|
|
+const countryList = ref([])
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ http.post('operator-config', { size: 10000 }).then((res) => {
|
|
|
|
|
+ countryList.value = res.items.map((item) => item.country)
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
function rowClick(row, column) {
|
|
function rowClick(row, column) {
|
|
|
table.value.tableEl.toggleRowExpansion(row)
|
|
table.value.tableEl.toggleRowExpansion(row)
|
|
|
}
|
|
}
|
|
@@ -323,13 +325,6 @@ async function getPhoneList() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
getPhoneList()
|
|
getPhoneList()
|
|
|
-const operatorList = ref([])
|
|
|
|
|
-
|
|
|
|
|
-async function getOperatorList() {
|
|
|
|
|
- operatorList.value = (await http.post('/channel')).items
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-getOperatorList()
|
|
|
|
|
|
|
|
|
|
function phoneListFormatter(row, column, cellValue, index) {
|
|
function phoneListFormatter(row, column, cellValue, index) {
|
|
|
return phoneList.value.find((item) => item.id === cellValue)?.name
|
|
return phoneList.value.find((item) => item.id === cellValue)?.name
|