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