|
@@ -42,7 +42,7 @@ function handleCleanFilter(){
|
|
|
|
|
|
const classifyOptions = ref([])
|
|
const classifyOptions = ref([])
|
|
const permissionOptions = ref([])
|
|
const permissionOptions = ref([])
|
|
-async function getClassify() {
|
|
|
|
|
|
+async function getClassify(type='') {
|
|
|
|
|
|
const res = await reportExternalInterface.getClasssify()
|
|
const res = await reportExternalInterface.getClasssify()
|
|
if (res.Ret !== 200) return
|
|
if (res.Ret !== 200) return
|
|
@@ -50,12 +50,13 @@ async function getClassify() {
|
|
classifyOptions.value = res.Data||[];
|
|
classifyOptions.value = res.Data||[];
|
|
filterEmpty(classifyOptions.value)
|
|
filterEmpty(classifyOptions.value)
|
|
|
|
|
|
- listState.classifys = collectClassifyOpts.value.length ? collectClassifyOpts.value.map(_ => _.Id) : []
|
|
|
|
- getList()
|
|
|
|
-
|
|
|
|
- handleShowFilter()
|
|
|
|
|
|
+ if(type === 'init') {
|
|
|
|
+ listState.classifys = collectClassifyOpts.value.length ? collectClassifyOpts.value.map(_ => _.Id) : [];
|
|
|
|
+ getList()
|
|
|
|
+ handleShowFilter()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-getClassify()
|
|
|
|
|
|
+getClassify('init')
|
|
function filterEmpty(arr) {
|
|
function filterEmpty(arr) {
|
|
arr.length && arr.forEach(item => {
|
|
arr.length && arr.forEach(item => {
|
|
item.Children.length && filterEmpty(item.Children)
|
|
item.Children.length && filterEmpty(item.Children)
|
|
@@ -153,6 +154,7 @@ function refreshList(){
|
|
}
|
|
}
|
|
function handleReportChange() {
|
|
function handleReportChange() {
|
|
listState.keyWord = '';
|
|
listState.keyWord = '';
|
|
|
|
+ listState.loading = true;
|
|
// listState.permissions = [];
|
|
// listState.permissions = [];
|
|
showMoreFilter.value = false
|
|
showMoreFilter.value = false
|
|
refreshList()
|
|
refreshList()
|
|
@@ -233,12 +235,13 @@ async function handleChangeReportClassifyCollect(item) {
|
|
item.IsCollect = item.IsCollect?0:1
|
|
item.IsCollect = item.IsCollect?0:1
|
|
|
|
|
|
listState.list.forEach(_ => {
|
|
listState.list.forEach(_ => {
|
|
- let reportClssifyId = isRise.value ? (item.ClassifyIdThird||item.ClassifyIdSecond||item.ClassifyIdFirst) : item.ClassifyId;
|
|
|
|
|
|
+ let reportClssifyId = isRise.value ? (_.ClassifyIdThird||_.ClassifyIdSecond||_.ClassifyIdFirst) : _.ClassifyId;
|
|
if(ClassifyId===reportClssifyId) {
|
|
if(ClassifyId===reportClssifyId) {
|
|
_.IsCollect = item.IsCollect;
|
|
_.IsCollect = item.IsCollect;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
showToast(item.IsCollect===1?'收藏报告分类成功':'取消收藏成功')
|
|
showToast(item.IsCollect===1?'收藏报告分类成功':'取消收藏成功')
|
|
|
|
+ getClassify()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|