ソースを参照

zhangtao

tags/v1.0.0^2
zhangtao 2年前
コミット
369e531e1f
5個のファイルの変更21行の追加15行の削除
  1. +16
    -7
      src/utils/dictionary.js
  2. +1
    -1
      src/views/question-manage/question-list/components/PreviewModal.vue
  3. +1
    -1
      src/views/question-manage/question-list/tools/table.js
  4. +2
    -5
      src/views/task-manage/question/tools/search.js
  5. +1
    -1
      src/views/task-manage/question/tools/table.js

+ 16
- 7
src/utils/dictionary.js ファイルの表示

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

+ 1
- 1
src/views/question-manage/question-list/components/PreviewModal.vue ファイルの表示

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


+ 1
- 1
src/views/question-manage/question-list/tools/table.js ファイルの表示

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

+ 2
- 5
src/views/task-manage/question/tools/search.js ファイルの表示

@@ -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 ファイルの表示

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

読み込み中…
キャンセル
保存