|
@@ -27,17 +27,11 @@
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- max-height="calc(100vh - 210px);"
|
|
|
- v-loading="loading"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-table :data="tableData" max-height="calc(100vh - 210px);" v-loading="loading" style="width: 100%">
|
|
|
<el-table-column v-col="'name'" label="名称" prop="name" align="center" />
|
|
|
<el-table-column v-col="'simStatus'" label="状态" prop="simStatus" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-tag type="primary" v-if="scope.row.status">{{ formatStatus(scope.row.status) }}</el-tag>
|
|
|
- <el-tag type="danger" v-else>{{ formatStatus(scope.row.status) }}</el-tag>
|
|
|
+ <el-tag :type="scope.row.status === '0' ? 'danger' : 'primary'">{{ formatStatus(scope.row.status) }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-col="'remark'" label="说明" prop="remark" align="center" />
|
|
@@ -49,13 +43,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination
|
|
|
- v-if="params.total"
|
|
|
- :total="params.total"
|
|
|
- v-model:page="params.pageNum"
|
|
|
- v-model:limit="params.pageSize"
|
|
|
- @pagination="getList()"
|
|
|
- />
|
|
|
+ <pagination v-if="params.total" :total="params.total" v-model:page="params.pageNum" v-model:limit="params.pageSize" @pagination="getList()" />
|
|
|
</el-card>
|
|
|
<AddOrEditItem ref="AddOrEditItemRef" @updateList="getList()" />
|
|
|
</div>
|
|
@@ -78,7 +66,7 @@ const AddOrEditItemRef = ref();
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = () => {
|
|
|
- params.keyWord = ""
|
|
|
+ params.keyWord = ""
|
|
|
getList();
|
|
|
};
|
|
|
|
|
@@ -86,24 +74,23 @@ const resetQuery = () => {
|
|
|
* 单一删除
|
|
|
*/
|
|
|
const onDel = (row: any) => {
|
|
|
- ElMessageBox.confirm(`此操作将卡号为:“${row.accNumber}”,是否继续?`, '提示', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- }).then(async () => {
|
|
|
- await api.simCard.deleteItem({ ids: [row.id] });
|
|
|
- ElMessage.success('删除成功');
|
|
|
- getList();
|
|
|
- });
|
|
|
+ ElMessageBox.confirm(`此操作将卡号为:“${row.accNumber}”,是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(async () => {
|
|
|
+ await api.simCard.deleteItem({ ids: [row.id] });
|
|
|
+ ElMessage.success('删除成功');
|
|
|
+ getList();
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
-const formatStatus = (val:any) => {
|
|
|
- console.log(val);
|
|
|
+const formatStatus = (val: any) => {
|
|
|
// 1:开启 0:禁用
|
|
|
return ['禁用', '开启'][val];
|
|
|
}
|
|
|
|
|
|
-const onOpenDetail = (item:any) => {
|
|
|
+const onOpenDetail = (item: any) => {
|
|
|
AddOrEditItemRef.value.openDialog(item);
|
|
|
}
|
|
|
|