Browse Source

Merge branch 'zhangtao' of gitadmin/tuoheng_lc_web into develop

tags/v1.0.0^2
zhangtao 2 years ago
parent
commit
748d2fe6e6
16 changed files with 71 additions and 29 deletions
  1. +16
    -7
      src/utils/dictionary.js
  2. +5
    -1
      src/views/question-manage/question-distribution/index.vue
  3. +2
    -2
      src/views/question-manage/question-distribution/tools/search.js
  4. +1
    -1
      src/views/question-manage/question-list/components/PreviewModal.vue
  5. +5
    -1
      src/views/question-manage/question-list/index.vue
  6. +2
    -2
      src/views/question-manage/question-list/tools/search.js
  7. +1
    -1
      src/views/question-manage/question-list/tools/table.js
  8. +5
    -1
      src/views/report-manage/all-report/index.vue
  9. +5
    -1
      src/views/system-manage/department-manage/index.vue
  10. +5
    -1
      src/views/system-manage/menu-manage/index.vue
  11. +5
    -1
      src/views/system-manage/role-manage/index.vue
  12. +5
    -1
      src/views/system-manage/user-manage/index.vue
  13. +5
    -1
      src/views/task-manage/all-task/index.vue
  14. +6
    -2
      src/views/task-manage/question/index.vue
  15. +2
    -5
      src/views/task-manage/question/tools/search.js
  16. +1
    -1
      src/views/task-manage/question/tools/table.js

+ 16
- 7
src/utils/dictionary.js View File

@@ -1,3 +1,10 @@
import { getQuestionType } from '@/api/task/index.js'
import { dataToSelect } from '@/utils/handleData.js'
import { ref } from 'vue'

export const QUESTION_TYPE = ref([])
export const QUESTION_TYPE_ALL = ref([])

export const TASK_STATUS = [
{ label: '待飞行', value: 1 },
{ label: '飞行中', value: 2 },
@@ -15,13 +22,6 @@ export const TASK_TYPE = [
{ label: '应急巡检', value: 2 }
]

export const QUESTION_TYPE = [
{ label: '林场问题图斑', value: 'LC001' },
{ label: '病虫树', value: 'LC002' },
{ label: '人员活动', value: 'LC003' },
{ label: '火灾隐患', value: 'LC004' }
]

export const QUESTION_STATUS = [
{ label: '已确认', value: 1 },
{ label: '已忽略', value: 2 },
@@ -52,3 +52,12 @@ export const MENU_STATUS = [
{ label: '在用', value: 1 },
{ label: '停用', value: 2 }
]

const getQuestionList = (async function() {
const res = await getQuestionType()
if (res.code === 0) {
const data = dataToSelect(res.data, { label: 'content', value: 'code' })
QUESTION_TYPE.value = data
QUESTION_TYPE_ALL.value = [{ label: '全部', value: 'all' }].concat(data)
}
})()

+ 5
- 1
src/views/question-manage/question-distribution/index.vue View File

@@ -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

+ 2
- 2
src/views/question-manage/question-distribution/tools/search.js View File

@@ -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'
}
},
{

+ 1
- 1
src/views/question-manage/question-list/components/PreviewModal.vue View File

@@ -77,7 +77,7 @@ export default defineComponent({
})

const getQuestionType = computed(() => {
const row = QUESTION_TYPE.find((item) => { return item.value === data.selectRow.type })
const row = QUESTION_TYPE.value.find((item) => { return item.value === data.selectRow.type })
return row?.label || '-'
})


+ 5
- 1
src/views/question-manage/question-list/index.vue View File

@@ -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
}

+ 2
- 2
src/views/question-manage/question-list/tools/search.js View File

@@ -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'
}
},
{

+ 1
- 1
src/views/question-manage/question-list/tools/table.js View File

@@ -56,7 +56,7 @@ const data = reactive({
render(row) {
return h(TableTags, {
data: row.type,
filters: QUESTION_TYPE
filters: QUESTION_TYPE.value
})
}
},

+ 5
- 1
src/views/report-manage/all-report/index.vue View File

@@ -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

+ 5
- 1
src/views/system-manage/department-manage/index.vue View File

@@ -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,

+ 5
- 1
src/views/system-manage/menu-manage/index.vue View File

@@ -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,

+ 5
- 1
src/views/system-manage/role-manage/index.vue View File

@@ -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,

+ 5
- 1
src/views/system-manage/user-manage/index.vue View File

@@ -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,

+ 5
- 1
src/views/task-manage/all-task/index.vue View File

@@ -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,

+ 6
- 2
src/views/task-manage/question/index.vue View File

@@ -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)
}

+ 2
- 5
src/views/task-manage/question/tools/search.js View File

@@ -1,5 +1,5 @@
import { reactive } from 'vue'
import { QUESTION_TYPE, QUESTION_STATUS } from '@/utils/dictionary.js'
import { QUESTION_TYPE_ALL, QUESTION_STATUS } from '@/utils/dictionary.js'

const data = reactive([
{
@@ -9,10 +9,7 @@ const data = reactive([
value: 'all',
props: {
placeholder: '请选择问题类型',
options: [
{ label: '全部', value: 'all' },
...QUESTION_TYPE
]
options: QUESTION_TYPE_ALL
}
},
{

+ 1
- 1
src/views/task-manage/question/tools/table.js View File

@@ -86,7 +86,7 @@ const data = reactive({
render(row) {
return h(TableTags, {
data: row.type,
filters: QUESTION_TYPE
filters: QUESTION_TYPE.value
})
}
},

Loading…
Cancel
Save