@@ -12,7 +12,7 @@ | |||
</template> | |||
<script> | |||
import { reactive, toRefs, onMounted } from 'vue' | |||
import { reactive, toRefs, onMounted, onUnmounted } from 'vue' | |||
import search from './tools/search.js' | |||
import HeadSearch from '@/components/Search/index.vue' | |||
import PositionMsg from '@/components/PositionMsg/index.vue' | |||
@@ -46,6 +46,10 @@ export default { | |||
handleSearch() | |||
}) | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
return { | |||
...toRefs(data), | |||
handleSearch |
@@ -8,8 +8,8 @@ const data = reactive([ | |||
value: null, | |||
props: { | |||
type: 'daterange', | |||
valueFormat: 'yyyy-MM-dd HH:mm:ss', | |||
format: 'yyyy-MM-dd HH:mm:ss' | |||
valueFormat: 'yyyy-MM-dd', | |||
format: 'yyyy-MM-dd' | |||
} | |||
}, | |||
{ |
@@ -25,7 +25,7 @@ import HeadSearch from '@/components/Search/index.vue' | |||
import DataTable from '@/components/DataTable/index.vue' | |||
import MapDrawer from './components/MapDrawer.vue' | |||
import PreviewModal from './components/PreviewModal.vue' | |||
import { reactive, unref, toRefs } from 'vue' | |||
import { reactive, unref, toRefs, onUnmounted } from 'vue' | |||
import { getQuestionList } from '@/api/task/index.js' | |||
export default { | |||
@@ -57,6 +57,10 @@ export default { | |||
data.modalShow = true | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
function getTableData(list) { | |||
data.pageData = list.items | |||
} |
@@ -8,8 +8,8 @@ const data = reactive([ | |||
value: null, | |||
props: { | |||
type: 'daterange', | |||
valueFormat: 'yyyy-MM-dd HH:mm:ss', | |||
format: 'yyyy-MM-dd HH:mm:ss' | |||
valueFormat: 'yyyy-MM-dd', | |||
format: 'yyyy-MM-dd' | |||
} | |||
}, | |||
{ |
@@ -22,7 +22,7 @@ import { search, getAirOptions } from './tools/search.js' | |||
import HeadSearch from '@/components/Search/index.vue' | |||
import DataTable from '@/components/DataTable/index.vue' | |||
import ReportDrawer from './components/ReportDrawer.vue' | |||
import { reactive, unref, toRefs } from 'vue' | |||
import { reactive, unref, toRefs, onUnmounted } from 'vue' | |||
import { getReportList } from '@/api/report/index.js' | |||
export default { | |||
@@ -48,6 +48,10 @@ export default { | |||
return await getReportList(_params) | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
return { | |||
...toRefs(data), | |||
loadDataTable |
@@ -28,7 +28,7 @@ import headSearch from '@/components/Search/index.vue' | |||
import dataTable from '@/components/DataTable/index.vue' | |||
import DepartmentModal from './components/DepartmentModal.vue' | |||
import { getDeptList } from '@/api/system/dept/index.js' | |||
import { unref, toRefs, reactive } from 'vue' | |||
import { unref, toRefs, reactive, onUnmounted } from 'vue' | |||
export default { | |||
name: 'MenuPage', | |||
@@ -54,6 +54,10 @@ export default { | |||
data.modalShow = true | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
return { | |||
...toRefs(data), | |||
loadDataTable, |
@@ -27,7 +27,7 @@ import headSearch from '@/components/Search/index.vue' | |||
import dataTable from '@/components/DataTable/index.vue' | |||
import MenuModal from './components/MenuModal.vue' | |||
import { getMenuList } from '@/api/system/menu/index.js' | |||
import { unref, reactive, toRefs } from 'vue' | |||
import { unref, reactive, toRefs, onUnmounted } from 'vue' | |||
export default { | |||
name: 'MenuPage', | |||
@@ -53,6 +53,10 @@ export default { | |||
data.modalShow = true | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
return { | |||
...toRefs(data), | |||
loadDataTable, |
@@ -41,7 +41,7 @@ import dataTable from '@/components/DataTable/index.vue' | |||
import RoleModal from './components/RoleModal.vue' | |||
import ConfigModal from './components/ConfigModal.vue' | |||
import { getRoleList } from '@/api/system/role/index' | |||
import { ref, unref, toRefs, reactive } from 'vue' | |||
import { ref, unref, toRefs, reactive, onUnmounted } from 'vue' | |||
export default { | |||
name: 'MenuPage', | |||
@@ -82,6 +82,10 @@ export default { | |||
} | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
return { | |||
...toRefs(data), | |||
loadDataTable, |
@@ -38,7 +38,7 @@ import headSearch from '@/components/Search/index.vue' | |||
import dataTable from '@/components/DataTable/index.vue' | |||
import UserModal from './components/UserModal.vue' | |||
import { getUserList } from '@/api/system/user/index.js' | |||
import { unref, ref, toRefs, reactive } from 'vue' | |||
import { unref, ref, toRefs, reactive, onUnmounted } from 'vue' | |||
export default { | |||
name: 'MenuPage', | |||
@@ -80,6 +80,10 @@ export default { | |||
} | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
return { | |||
...toRefs(data), | |||
loadDataTable, |
@@ -46,7 +46,7 @@ import TaskModal from './components/TaskModal.vue' | |||
import LiveDrawer from './components/LiveDrawer.vue' | |||
import DemandDrawer from './components/DemandDrawer.vue' | |||
import VerifyDrawer from './components/VerifyDrawer.vue' | |||
import { reactive, ref, unref, toRefs } from 'vue' | |||
import { reactive, ref, unref, toRefs, onUnmounted } from 'vue' | |||
import { getTaskList } from '@/api/task/index.js' | |||
export default { | |||
@@ -94,6 +94,10 @@ export default { | |||
} | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
return { | |||
...toRefs(data), | |||
searchRef, |
@@ -26,7 +26,7 @@ | |||
<ConfirmModal v-if="confirmModal" v-model:visible="confirmModal" :data="pageData" :select-row="rowData" @update-data="handleReload" /> | |||
<!-- 图片位置 --> | |||
<position-drawer v-model:visible="positionDrawer" :data="rowData" /> | |||
<position-drawer v-model:visible="positionDrawer" :data="pageData" /> | |||
</template> | |||
@@ -38,7 +38,7 @@ import DataTable from '@/components/DataTable/index.vue' | |||
import ConfirmModal from './components/ConfirmModal.vue' | |||
import PositionDrawer from './components/PositionDrawer.vue' | |||
import { getQuestionList, generateReport, questionAnalyze } from '@/api/task/index.js' | |||
import { unref, reactive, toRefs, provide } from 'vue' | |||
import { unref, reactive, toRefs, provide, onUnmounted } from 'vue' | |||
export default { | |||
name: 'QuestionPage', | |||
components: { HeadSearch, DataTable, ConfirmModal, PositionDrawer }, | |||
@@ -152,6 +152,10 @@ export default { | |||
} | |||
} | |||
onUnmounted(() => { | |||
data.searchParams = null | |||
}) | |||
function handleReload() { | |||
data.handleSearch(data.searchParams, false) | |||
} |