重构代码, 移除一些warning
This commit is contained in:
parent
df06dd5501
commit
6d789a97cd
@ -294,7 +294,7 @@ export default class extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
private async getRemoteDeptList(name: string) {
|
||||
private async getRemoteDeptList(name?: string) {
|
||||
const { data } = await getShops({ key: name })
|
||||
if (!data.records) return
|
||||
this.allDepts = data.records
|
||||
|
@ -314,7 +314,7 @@ export default class extends Vue {
|
||||
|
||||
private async getRemoteCategory() {
|
||||
try {
|
||||
const { data } = await getShopCategory(this.postForm.shop)
|
||||
const { data } = await getShopCategory(this.postForm.shop!)
|
||||
this.tagOptions = data
|
||||
this.$forceUpdate()
|
||||
} catch (err) {
|
||||
|
@ -65,6 +65,7 @@
|
||||
type="success"
|
||||
icon="el-icon-upload2"
|
||||
@click="handleImport"
|
||||
v-loading="loading"
|
||||
>
|
||||
导入Excel
|
||||
</el-button>
|
||||
@ -248,6 +249,7 @@ export default class extends Vue {
|
||||
private listLoading = false
|
||||
private cateLoading = false
|
||||
private allDepts: IShopData[] = []
|
||||
private loading = false
|
||||
private listQuery = {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
@ -270,6 +272,7 @@ export default class extends Vue {
|
||||
results: null
|
||||
}
|
||||
|
||||
private filename: string|null = ''
|
||||
private deleteBtnName = '删除所有'
|
||||
private exportBtnName = '导出所有'
|
||||
private downloadLoading = false
|
||||
@ -278,6 +281,7 @@ export default class extends Vue {
|
||||
$refs!: {
|
||||
filterForm: HTMLFormElement
|
||||
'excel-upload-input': HTMLFormElement
|
||||
'question_table': HTMLTableElement
|
||||
}
|
||||
|
||||
get userLevel() {
|
||||
@ -447,7 +451,9 @@ export default class extends Vue {
|
||||
})
|
||||
const ids: string[] = []
|
||||
for (const s of this.multipleSelection) {
|
||||
ids.push(s._id)
|
||||
if (s._id) {
|
||||
ids.push(s._id!)
|
||||
}
|
||||
}
|
||||
const { data } = await deleteShopQuestion(this.listQuery.shop, ids);
|
||||
(this.$refs.question_table as any).clearSelection()
|
||||
|
Loading…
x
Reference in New Issue
Block a user