| | |
| | | import { Base64 } from 'js-base64'; |
| | | import { $fytz } from '../index'; |
| | | import { Base64 } from 'js-base64' |
| | | import { $fytz } from '../index' |
| | | |
| | | /** |
| | | * ä¿¡ç¨è¯ä¼°APIæ¥å£ |
| | |
| | | /** |
| | | * ä¸è½½ç¨æ·ç¯ä¿¡ç |
| | | * @param {*} userId |
| | | * @param {*} userName |
| | | */ |
| | | downloadCode(userId) { |
| | | downloadCode(userId, userName) { |
| | | return $fytz |
| | | .get(`credit/ecCode/download?userId=${userId}`, { responseType: 'blob' }) |
| | | .then((res) => { |
| | | const name = Base64.decode(res.headers.get('fileName')); |
| | | const url = window.URL.createObjectURL(res.data); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.setAttribute('download', name); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | }); |
| | | } |
| | | }; |
| | | const name = res.headers.get('fileName') || userName |
| | | const fileName = Base64.decode(name) |
| | | const url = window.URL.createObjectURL(res.data) |
| | | const link = document.createElement('a') |
| | | link.href = url |
| | | link.setAttribute('download', fileName) |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | document.body.removeChild(link) |
| | | window.URL.revokeObjectURL(url) |
| | | }) |
| | | }, |
| | | } |
| | |
| | | return { |
| | | // collapse: false, |
| | | menuHeight: '80vh', |
| | | title: 'æ²¹çæºè½ä¸ä½åå¹³å°', |
| | | title: 'æ²¹çæºè½çæµä¸ç管', |
| | | subTitle: 'Â©ä¸æµ·é£ç¾½ç¯ä¿ç§ææéå
¬å¸', |
| | | appIcon: AppIcon, |
| | | } |
| | |
| | | export { MENU } from './menu' |
| | | export { envCreditCode } from './envCreditCode' |
| | |
| | | name: 'ç管巡æ¥', |
| | | children: [ |
| | | { |
| | | path: '/index/inspection/monitor-control', |
| | | icon: 'solar:eye-scan-line-duotone', |
| | | name: 'çç®¡çæ§', |
| | | }, |
| | | { |
| | | path: '/index/inspection/task-manage', |
| | | icon: 'solar:file-text-line-duotone', |
| | | name: 'ä»»å¡ç®¡ç', |
| | | }, |
| | | { |
| | | path: '/index/inspection/scene-info', |
| | | icon: 'solar:shop-2-line-duotone', |
| | | name: 'åºéºç®¡ç', |
| | | }, |
| | | |
| | | { |
| | | path: '/index/inspection/pro-check', |
| | | icon: 'solar:checklist-minimalistic-line-duotone', |
| | |
| | | icon: 'solar:folder-favourite-bookmark-line-duotone', |
| | | name: 'è¯ä¼°æ¥å', |
| | | }, |
| | | { |
| | | path: '/index/inspection/scene-info', |
| | | icon: 'solar:shop-2-line-duotone', |
| | | name: 'åºéºç®¡ç', |
| | | }, |
| | | // { |
| | | // path: '/index/analysis/data-product', |
| | | // icon: 'solar:document-add-line-duotone', |
| | |
| | | path: 'report-manage', |
| | | component: () => import('@/views/inspection/report/ReportManage.vue'), |
| | | }, |
| | | { |
| | | name: 'monitor-control', |
| | | path: 'monitor-control', |
| | | component: () => import('@/views/inspection/MonitorControl.vue'), |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template>s</template> |
| | |
| | | <template> |
| | | <FYTable @search="onSearch" :row-class-name="tableRowClassName"> |
| | | <template #options> |
| | | <FYOptionLocation |
| | | :allOption="true" |
| | | :level="5" |
| | | v-model:value="formSearch._locations" |
| | | ></FYOptionLocation> |
| | | <FYOptionText |
| | | label="åºæ¯åç§°" |
| | | placeholder="è¾å
¥åç§°å
³é®å" |
| | | v-model:value="formSearch.searchText" |
| | | ></FYOptionText> |
| | | <FYOptionScene |
| | | :allOption="true" |
| | | :type="1" |
| | | :initValue="false" |
| | | v-model:value="formSearch.scensetype" |
| | | ></FYOptionScene> |
| | | <FYOptionOnlineStatus |
| | | :allOption="true" |
| | | v-model:value="formSearch.online" |
| | | ></FYOptionOnlineStatus> |
| | | </template> |
| | | <div class="p-h-8"> |
| | | <FYTable @search="onSearch" :row-class-name="tableRowClassName"> |
| | | <template #options> |
| | | <FYOptionLocation |
| | | :allOption="true" |
| | | :level="5" |
| | | v-model:value="formSearch._locations" |
| | | ></FYOptionLocation> |
| | | <FYOptionText |
| | | label="åºæ¯åç§°" |
| | | placeholder="è¾å
¥åç§°å
³é®å" |
| | | v-model:value="formSearch.searchText" |
| | | ></FYOptionText> |
| | | <FYOptionScene |
| | | :allOption="true" |
| | | :type="1" |
| | | :initValue="false" |
| | | v-model:value="formSearch.scensetype" |
| | | ></FYOptionScene> |
| | | <FYOptionOnlineStatus |
| | | :allOption="true" |
| | | v-model:value="formSearch.online" |
| | | ></FYOptionOnlineStatus> |
| | | </template> |
| | | |
| | | <template #table-column> |
| | | <el-table-column |
| | | fixed="left" |
| | | prop="userInfo.realname" |
| | | label="åç§°" |
| | | :show-overflow-tooltip="true" |
| | | width="400" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="userInfo.acountname" label="è´¦å·" width="110" /> |
| | | <el-table-column prop="sceneTypeName" label="ç±»å" width="100" /> |
| | | <el-table-column prop="biProvinceName" label="ç" width="80" /> |
| | | <el-table-column prop="biCityName" label="å¸" width="80" /> |
| | | <!-- <el-table-column prop="districtname" label="åºå¿" width="90" /> --> |
| | | <el-table-column prop="userInfo.extension1" label="åºå¿" width="80" /> |
| | | <el-table-column prop="biTownName" label="è¡é" width="110" /> |
| | | <el-table-column prop="biArea" label="éä¸åº" width="110" /> |
| | | <el-table-column prop="biManagementCompany" label="ç©ä¸" min-width="110" /> |
| | | <el-table-column prop="userInfo.isenable" label="ç¶æ" width="90"> |
| | | <template #default="{ row }"> |
| | | {{ row.userInfo.isenable ? 'ä¸çº¿ä¸' : 'å·²ä¸çº¿' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="userInfo.usertype" label="ç¨æ·ç±»å" width="90" /> |
| | | <el-table-column fixed="right" align="right" label="æä½" width="190"> |
| | | <template #header> |
| | | <el-button icon="DocumentAdd" size="default" type="success" @click="drawer = true" |
| | | >æ°å¢ç¨æ·</el-button |
| | | > |
| | | </template> |
| | | <template #default="{ row }"> |
| | | <el-space> |
| | | <el-button |
| | | :loading="row.loading2" |
| | | :type="row.userInfo.isenable != '0' ? 'danger' : 'primary'" |
| | | size="small" |
| | | @click="itemActive(row)" |
| | | >{{ row.userInfo.isenable != '0' ? 'ä¸çº¿' : 'ä¸çº¿' }}</el-button |
| | | <template #table-column> |
| | | <el-table-column |
| | | fixed="left" |
| | | prop="userInfo.realname" |
| | | label="åç§°" |
| | | :show-overflow-tooltip="true" |
| | | width="400" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="userInfo.acountname" label="è´¦å·" width="110" /> |
| | | <el-table-column prop="sceneTypeName" label="ç±»å" width="100" /> |
| | | <el-table-column prop="biProvinceName" label="ç" width="80" /> |
| | | <el-table-column prop="biCityName" label="å¸" width="80" /> |
| | | <!-- <el-table-column prop="districtname" label="åºå¿" width="90" /> --> |
| | | <el-table-column prop="userInfo.extension1" label="åºå¿" width="80" /> |
| | | <el-table-column prop="biTownName" label="è¡é" width="110" /> |
| | | <el-table-column prop="biArea" label="éä¸åº" width="110" /> |
| | | <el-table-column prop="biManagementCompany" label="ç©ä¸" min-width="110" /> |
| | | <el-table-column prop="userInfo.isenable" label="ç¶æ" width="90"> |
| | | <template #default="{ row }"> |
| | | {{ row.userInfo.isenable ? 'ä¸çº¿ä¸' : 'å·²ä¸çº¿' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="userInfo.usertype" label="ç¨æ·ç±»å" width="90" /> |
| | | <el-table-column fixed="right" align="right" label="æä½" width="190"> |
| | | <template #header> |
| | | <el-button icon="DocumentAdd" size="default" type="success" @click="drawer = true" |
| | | >æ°å¢åºéº</el-button |
| | | > |
| | | <el-button-group> |
| | | <el-button type="primary" :loading="row.loading1" size="small" @click="editRow(row)" |
| | | >æ¥ç</el-button |
| | | </template> |
| | | <template #default="{ row }"> |
| | | <el-space> |
| | | <el-button |
| | | :loading="row.loading2" |
| | | :type="row.userInfo.isenable != '0' ? 'danger' : 'primary'" |
| | | size="small" |
| | | @click="itemActive(row)" |
| | | >{{ row.userInfo.isenable != '0' ? 'ä¸çº¿' : 'ä¸çº¿' }}</el-button |
| | | > |
| | | <el-dropdown @command="handleCommand" trigger="click"> |
| | | <el-button |
| | | type="primary" |
| | | :loading="row.downloadLoading" |
| | | size="small" |
| | | :icon="row.downloadLoading ? '' : 'ArrowDown'" |
| | | ></el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item icon="Download" :command="{ c: 1, p: row }" |
| | | >ä¸è½½ç¯ä¿¡ç </el-dropdown-item |
| | | > |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </el-button-group> |
| | | <!-- <el-dropdown |
| | | <el-button-group> |
| | | <el-button type="primary" :loading="row.loading1" size="small" @click="editRow(row)" |
| | | >æ¥ç</el-button |
| | | > |
| | | <el-dropdown @command="handleCommand" trigger="click"> |
| | | <el-button |
| | | type="primary" |
| | | :loading="row.downloadLoading" |
| | | size="small" |
| | | :icon="row.downloadLoading ? '' : 'ArrowDown'" |
| | | ></el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item icon="Download" :command="{ c: 1, p: row }" |
| | | >ä¸è½½ç¯ä¿¡ç </el-dropdown-item |
| | | > |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </el-button-group> |
| | | <!-- <el-dropdown |
| | | split-button |
| | | :loading="row.loading1" |
| | | size="small" |
| | |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> --> |
| | | </el-space> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </FYTable> |
| | | </el-space> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </FYTable> |
| | | </div> |
| | | <CompUserInfoAddDrawer v-model="drawer"></CompUserInfoAddDrawer> |
| | | </template> |
| | | |
| | |
| | | return row.userInfo.isenable ? 'online-row' : 'offline-row' |
| | | }, |
| | | handleCommand(e) { |
| | | const userId = e.p.userInfo.guid |
| | | const { guid: userId, realname: userName } = e.p.userInfo |
| | | switch (e.c) { |
| | | // ä¸è½½ç¯ä¿¡ç |
| | | case 1: |
| | | e.p.downloadLoading = true |
| | | creditApi.downloadCode(userId).finally(() => { |
| | | creditApi.downloadCode(userId, userName).finally(() => { |
| | | e.p.downloadLoading = false |
| | | }) |
| | | break |
| | |
| | | placeholder="头åurl" |
| | | /> |
| | | </el-form-item> --> |
| | | <el-form-item label="è´¦æ·å" prop="acountname"> |
| | | <el-input clearable v-model="formObj.acountname" placeholder="è´¦æ·å" /> |
| | | <el-form-item label="åºéºå" prop="acountname"> |
| | | <el-input clearable v-model="formObj.acountname" placeholder="åºéºå" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¨æ·æµç§°" prop="realname"> |
| | | <el-input clearable v-model="formObj.realname" placeholder="ç¨æ·æµç§°" /> |
| | | <el-form-item label="æµç§°" prop="realname"> |
| | | <el-input clearable v-model="formObj.realname" placeholder="æµç§°" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¯ç " prop="password"> |
| | | <el-col :span="18"> |
| | |
| | | prop="_scenetype" |
| | | :allOption="false" |
| | | :type="1" |
| | | :initValue="false" |
| | | :initValue="true" |
| | | v-model:value="formObj._scenetype" |
| | | ></FYOptionScene> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { defineProps, defineEmits, reactive, ref, watch, computed } from 'vue'; |
| | | import { getSceneName } from '@/enum/scene'; |
| | | import userApi from '@/api/fytz/userApi'; |
| | | import { useMessageBoxTip } from '@/composables/messageBox'; |
| | | import { defineProps, defineEmits, reactive, ref, watch, computed } from 'vue' |
| | | import { getSceneName } from '@/enum/scene' |
| | | import userApi from '@/api/fytz/userApi' |
| | | import { useMessageBoxTip } from '@/composables/messageBox' |
| | | |
| | | const props = defineProps({ |
| | | //åºæ¬ä¿¡æ¯ |
| | | model: { |
| | | type: Object |
| | | type: Object, |
| | | // default: () => { |
| | | // return { isenable: true }; |
| | | // } |
| | | }, |
| | | create: { |
| | | type: Boolean, |
| | | default: false |
| | | default: false, |
| | | }, |
| | | active: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }); |
| | | default: false, |
| | | }, |
| | | }) |
| | | |
| | | const formInfo = ref({ isenable: true }); |
| | | const formInfo = ref({ isenable: true }) |
| | | |
| | | watch( |
| | | () => props.model, |
| | | (nValue) => { |
| | | formInfo.value = parseUserInfo(nValue); |
| | | } |
| | | ); |
| | | formInfo.value = parseUserInfo(nValue) |
| | | }, |
| | | ) |
| | | |
| | | const emit = defineEmits(['onSubmit', 'onCancel', 'updateEdit']); |
| | | const emit = defineEmits(['onSubmit', 'onCancel', 'updateEdit']) |
| | | |
| | | const rules = reactive({ |
| | | acountname: [ |
| | | { |
| | | required: true, |
| | | message: 'è´¦æ·åä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | realname: [ |
| | | { |
| | | required: true, |
| | | message: 'ç¨æ·æµç§°ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | // password: [ |
| | | // { |
| | | // required: props.create, |
| | |
| | | // trigger: 'blur', |
| | | // }, |
| | | // ], |
| | | }); |
| | | }) |
| | | |
| | | // ç¨æ·åºæ¬ä¿¡æ¯æ ¼å¼å |
| | | function parseUserInfo(s) { |
| | | if (s.usertype && s.usertypeid) { |
| | | s._usertype = { |
| | | label: s.usertype, |
| | | value: s.usertypeid + '' |
| | | }; |
| | | value: s.usertypeid + '', |
| | | } |
| | | } |
| | | |
| | | if (s.extension2) { |
| | | s._scenetype = getSceneName(s.extension2, 1); |
| | | s._scenetype = getSceneName(s.extension2, 1) |
| | | } |
| | | |
| | | s._locations = {}; |
| | | s._locations = {} |
| | | |
| | | return s; |
| | | return s |
| | | } |
| | | |
| | | function parseUserInfoReverse(v) { |
| | | // è¡æ¿åºåä¿¡æ¯å¡«å
|
| | | const a = v._locations; |
| | | v.extension1 = a.dName; |
| | | const a = v._locations |
| | | v.extension1 = a.dName |
| | | // ç¨æ·ç±»åä¿¡æ¯å¡«å
|
| | | const b = v._usertype; |
| | | v.usertypeid = b.value; |
| | | v.usertype = b.label; |
| | | const b = v._usertype |
| | | v.usertypeid = b.value |
| | | v.usertype = b.label |
| | | |
| | | // åºæ¯ç±»åä¿¡æ¯å¡«å
|
| | | const c = v._scenetype; |
| | | v.extension2 = c.value; |
| | | const c = v._scenetype |
| | | v.extension2 = c.value |
| | | |
| | | return v; |
| | | return v |
| | | } |
| | | |
| | | function createUser(v, success, fail) { |
| | | const l = v._locations; |
| | | const l = v._locations |
| | | const params = { |
| | | userInfo: v, |
| | | baseInfo: { |
| | |
| | | biTownCode: l.tCode, |
| | | biTownName: l.tName, |
| | | biAreaCode: l.aCode, |
| | | biArea: l.aName |
| | | biArea: l.aName, |
| | | // biManagementCompanyId: |
| | | // biManagementCompany: |
| | | // biContact |
| | | // biTelephone |
| | | // biAddress |
| | | } |
| | | }; |
| | | }, |
| | | } |
| | | return userApi |
| | | .createUser(params) |
| | | .then(() => { |
| | | emit('onSubmit', params); |
| | | success(); |
| | | emit('onSubmit', params) |
| | | success() |
| | | }) |
| | | .catch((err) => { |
| | | fail(err); |
| | | }); |
| | | fail(err) |
| | | }) |
| | | } |
| | | |
| | | function updateUser(v, success, fail) { |
| | | return userApi |
| | | .updateUserInfo(v) |
| | | .then(() => { |
| | | emit('onSubmit', v); |
| | | if (success) success(); |
| | | emit('onSubmit', v) |
| | | if (success) success() |
| | | }) |
| | | .catch((err) => { |
| | | if (fail) fail(err); |
| | | }); |
| | | if (fail) fail(err) |
| | | }) |
| | | } |
| | | |
| | | function submit(v, success, fail) { |
| | | parseUserInfoReverse(v.value); |
| | | parseUserInfoReverse(v.value) |
| | | |
| | | return props.create ? createUser(v.value, success, fail) : updateUser(v.value, success, fail); |
| | | return props.create ? createUser(v.value, success, fail) : updateUser(v.value, success, fail) |
| | | // parseUserInfoReverse(props.formInfo); |
| | | |
| | | // return props.create |
| | |
| | | } |
| | | |
| | | // éç½®å¯ç |
| | | const pwLoading = ref(false); |
| | | const pwLoading = ref(false) |
| | | |
| | | function onResetPw() { |
| | | useMessageBoxTip({ |
| | | confirmMsg: 'æ¯å¦éç½®è¯¥åºæ¯å¯ç ï¼', |
| | | confirmTitle: 'éç½®å¯ç ', |
| | | onConfirm: async () => { |
| | | pwLoading.value = true; |
| | | pwLoading.value = true |
| | | return userApi.resetPassword(formInfo.value.guid).finally(() => { |
| | | pwLoading.value = false; |
| | | }); |
| | | } |
| | | }); |
| | | pwLoading.value = false |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <el-drawer |
| | | title="æ°å¢ç¨æ·" |
| | | title="æ°å¢åºéº" |
| | | direction="rtl" |
| | | :model-value="modelValue" |
| | | @open="updateDrawer(true)" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import CompUserInfo from './CompUserInfo.vue'; |
| | | import { useMessageBox } from '@/composables/messageBox'; |
| | | import CompUserInfo from './CompUserInfo.vue' |
| | | import { useMessageBox } from '@/composables/messageBox' |
| | | |
| | | export default { |
| | | components: { CompUserInfo }, |
| | |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | drawerEdit: false |
| | | }; |
| | | drawerEdit: false, |
| | | } |
| | | }, |
| | | methods: { |
| | | updateDrawer(status) { |
| | | this.$emit('update:modelValue', status); |
| | | this.$emit('update:modelValue', status) |
| | | }, |
| | | onDrawerClose(done) { |
| | | if (this.drawerEdit) { |
| | |
| | | confirmMsg: 'æ¯å¦æ¾å¼å·²ç¼è¾çå
容ï¼', |
| | | confirmTitle: 'å
³éå¼¹åºæ¡', |
| | | onConfirm: () => { |
| | | done(); |
| | | } |
| | | }); |
| | | done() |
| | | }, |
| | | }) |
| | | } else { |
| | | // ç´æ¥å
³é |
| | | done(); |
| | | done() |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <BaseContentLayout> |
| | | <BaseContentLayout asideWidth="0"> |
| | | <template #header> |
| | | <!-- <FYSearchBar @search="search"> |
| | | <template #options> |
| | | <FYOptionLocation |
| | | :allOption="true" |
| | | :level="3" |
| | | :checkStrictly="false" |
| | | v-model:value="formSearch.locations" |
| | | ></FYOptionLocation> |
| | | </template> |
| | | </FYSearchBar> --> |
| | | <div class="task-switcher"> |
| | | <el-button @click="switchTask(-1)" icon="ArrowLeft">åä¸ä¸ª</el-button> |
| | | <el-select |
| | | v-model="curTaskTitle" |
| | | @change="(t) => chooseTask(tasks.find((e) => e.title == t))" |
| | | style="width: 260px" |
| | | > |
| | | <el-option v-for="s in tasks" :key="s.title" :label="s.title" :value="s.title" /> |
| | | </el-select> |
| | | <el-button @click="switchTask(1)" icon="ArrowRight">åä¸ä¸ª</el-button> |
| | | </div> |
| | | </template> |
| | | <template #aside> |
| | | <SideList :items="tasks" :loading="sideLoading" @item-click="chooseTask"></SideList> |
| | | <!-- <SideList :items="tasks" :loading="sideLoading" @item-click="chooseTask"></SideList> --> |
| | | </template> |
| | | <template #main> |
| | | <ToolBar |
| | |
| | | :loading="mainLoading" |
| | | ></ToolBar> |
| | | <div v-if="curMonitorObjList.length > 0" v-loading="mainLoading"> |
| | | <!-- <div><el-text>ç管计å</el-text></div> |
| | | <el-button type="warning" size="small" @click="editPlan" |
| | | >计åè°æ´</el-button |
| | | > --> |
| | | <!-- <el-tabs model-value="first"> |
| | | <el-tab-pane label="å·¡æ¥è®¡å" name="first"> --> |
| | | <el-space justify="" :size="30" style="padding: 16px 0px 16px 16px"> |
| | | <el-text size="large">å·¡æ¥è®¡å</el-text> |
| | | <el-radio-group v-model="selectedSceneType" fill="#409eff"> |
| | |
| | | // å½åä»»å¡çå±ç¤ºä¸çç管对象 |
| | | showMonitorObjList: [], |
| | | //å½åéä¸çä»»å¡ |
| | | curTaskTitle: '', |
| | | curTask: {}, |
| | | // å½åä»»å¡ç´¢å¼ |
| | | currentTaskIndex: 0, |
| | | //å½åéä¸çæ¥ä»»å¡ |
| | | curDayTaskList: [], |
| | | daytaskLoading: false, |
| | |
| | | if (list.length == 0) { |
| | | this.sideLoading = false |
| | | this.mainLoading = false |
| | | } else { |
| | | this.curTaskTitle = this.tasks[this.currentTaskIndex].title |
| | | this.chooseTask(this.tasks[this.currentTaskIndex]) |
| | | } |
| | | }) |
| | | }, |
| | | // åæ¢ä»»å¡ |
| | | switchTask(direction) { |
| | | if (this.tasks.length === 0) return |
| | | |
| | | this.currentTaskIndex = |
| | | (this.currentTaskIndex + direction + this.tasks.length) % this.tasks.length |
| | | this.chooseTask(this.tasks[this.currentTaskIndex]) |
| | | }, |
| | | //è·åä»»å¡ç宿æ
åµ |
| | | getTaskType(s) { |
| | |
| | | return type |
| | | }, |
| | | chooseTask(task) { |
| | | // const task = this.tasks.find((e) => e.title == taskTitle) |
| | | this.curTaskTitle = task.title |
| | | this.task = task |
| | | this.sideLoading = false |
| | | this.mainLoading = true |
| | |
| | | .el-drawer__custom { |
| | | padding: 0px !important; |
| | | } |
| | | .task-switcher { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 10px; |
| | | padding: 10px; |
| | | } |
| | | </style> |