8 changed files with 69 additions and 223 deletions
@ -0,0 +1,30 @@ |
|||
import request from "@/utils/request"; |
|||
|
|||
/** |
|||
* 获取 select options 格式的数据 |
|||
* @param {1 | 2} type 1: 路管中心; 2: 驻点 |
|||
* @returns |
|||
*/ |
|||
export function getSelectOptionsStation(type) { |
|||
return request({ |
|||
url: `/business/employees/organization`, |
|||
method: "POST", |
|||
data: {}, |
|||
}) |
|||
.then((result) => { |
|||
if (result.code != 200) return; |
|||
|
|||
const data = []; |
|||
result.data.forEach((item) => { |
|||
if (!type || type == item.organizationType) |
|||
data.push({ |
|||
key: item.id, |
|||
label: item.organizationName, |
|||
disabled: false, |
|||
}); |
|||
}); |
|||
|
|||
return data; |
|||
}) |
|||
.catch((err) => {}); |
|||
} |
@ -1,119 +0,0 @@ |
|||
<template> |
|||
<Dialog v-model="visibleModel" title="修改值班信息表"> |
|||
<div class="ModifyDutyInformationTable"> |
|||
<div class="search"> |
|||
<Form :formList="formList" :rules="{ '桩号:': [{ required: true, message: '年龄不能为空' }] }" column="2" |
|||
style="flex: 1;" /> |
|||
|
|||
<ButtonGradient> |
|||
<template #prefix> |
|||
<img src="@screen/images/form/search.svg" /> |
|||
</template> |
|||
刷新 |
|||
</ButtonGradient> |
|||
</div> |
|||
<div class="body"> |
|||
<SelectList v-for="item in list" :data="item" /> |
|||
</div> |
|||
<div class="bottom"> |
|||
<Button>确认</Button> |
|||
<Button :style="{ backgroundColor: '#C9C9C9' }"> 取消</Button> |
|||
</div> |
|||
</div> |
|||
</Dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import Dialog from "@screen/components/Dialog/index.vue"; |
|||
import Button from "@screen/components/Buttons/Button.vue" |
|||
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; |
|||
import Form from '@screen/components/FormConfig'; |
|||
|
|||
import SelectList from "./../../../components/SelectList.vue" |
|||
|
|||
export default { |
|||
name: 'ModifyDutyInformationTable', |
|||
components: { |
|||
Dialog, |
|||
Button, |
|||
ButtonGradient, |
|||
SelectList, |
|||
Form |
|||
}, |
|||
props: { |
|||
visible: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
emit: ['close'], |
|||
data() { |
|||
return { |
|||
formList: [{ |
|||
label: "值班时间:", |
|||
key: "事件源", |
|||
type: "timePicker", |
|||
}, |
|||
{ |
|||
label: "操作人员:", |
|||
key: "桩号:", |
|||
type: "input", |
|||
}], |
|||
list: Array.from({ length: 15 }).map(item => ({ |
|||
title: "123456", |
|||
list: Array.from({ length: 15 }).map((_, index) => ({ |
|||
name: index, |
|||
phone: "12345678901" |
|||
})) |
|||
})) |
|||
} |
|||
}, |
|||
computed: { |
|||
visibleModel: { |
|||
get() { |
|||
return this.visible |
|||
}, |
|||
set(bool) { |
|||
this.$emit('close', bool); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
.ModifyDutyInformationTable { |
|||
width: 947px; |
|||
height: 658px; |
|||
color: #fff; |
|||
display: flex; |
|||
flex-direction: column; |
|||
gap: 15px; |
|||
|
|||
.search { |
|||
display: flex; |
|||
gap: 24px; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
|
|||
} |
|||
|
|||
.body { |
|||
display: flex; |
|||
gap: 9px; |
|||
height: 100%; |
|||
overflow-x: auto; |
|||
overflow-y: hidden; |
|||
} |
|||
|
|||
.bottom { |
|||
display: flex; |
|||
gap: 15px; |
|||
justify-content: end; |
|||
|
|||
>div { |
|||
width: 96px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
Loading…
Reference in new issue