| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" :fullscreen="full" title="新建考核项目" width="50%" draggable> |
| | | <el-dialog v-model="dialogVisible" :before-close="resetForm" :fullscreen="full" title="新建考核项目" width="50%" draggable> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-form :model="form" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="类型"> |
| | | <el-input v-model="form.name" type="textarea"></el-input> |
| | | <el-input v-model="form.itemType" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="考核项目"> |
| | | <el-input v-model="form.name" type="textarea"> </el-input> |
| | | <el-input v-model="form.itemDetail" type="textarea"> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="考核内容"> |
| | | <el-input v-model="form.name" type="textarea"> </el-input> |
| | | <el-input v-model="form.content" type="textarea"> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="评定标准"> |
| | | <el-input v-model="form.name" type="textarea"> </el-input> |
| | | <el-input v-model="form.judgeStandard" type="textarea"> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="考核说明"> |
| | | <el-input v-model="form.name" type="textarea"> </el-input> |
| | | <el-input v-model="form.memo" type="textarea"> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogVisible = false" size="default">继续添加</el-button> |
| | | <el-button @click="dialogVisible = false" size="default">关闭</el-button> |
| | | <el-button type="primary" @click="dialogVisible = false" size="default">确定</el-button> |
| | | <el-button @click="resetForm" size="default">关闭</el-button> |
| | | <el-button type="primary" @click="submitForm" size="default">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | // import DailogSearch from '../../../../components/DailogSearch/DailogSearch.vue' |
| | | export default defineComponent({ |
| | | // components:{DailogAdd,DailogSearch}, |
| | | setup() { |
| | | setup(props, { emit }) { |
| | | const dialogVisible = ref<boolean>(false); |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | const form = ref({ |
| | | itemType: '', ////类型 |
| | | memo: '', //备注 |
| | | itemDetail: '', ////考核项目 |
| | | content: '', ////考核内容 |
| | | judgeStandard: '', ////评定标准 |
| | | }); |
| | | const openDailog = (type: string, value: any, projectList: any, projectId: string) => { |
| | | const openDailog = (title: string, value: any) => { |
| | | dialogVisible.value = true; |
| | | if (title == '查看') { |
| | | form.value = value; |
| | | } |
| | | }; |
| | | // 导航 |
| | | const activeName = ref('1'); |
| | | // 表格 |
| | | const tableData = [ |
| | | { |
| | | date: '2016-05-03', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | { |
| | | date: '2016-05-02', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | { |
| | | date: '2016-05-04', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | { |
| | | date: '2016-05-01', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | ]; |
| | | // 新增弹窗 |
| | | const Show = ref(); |
| | | const daiAdd = () => { |
| | | Show.value.openDailog(); |
| | | // 提交 |
| | | const submitForm = () => { |
| | | dialogVisible.value = false; |
| | | emit('onAdd', form.value); |
| | | form.value = { |
| | | itemType: '', ////类型 |
| | | memo: '', //备注 |
| | | itemDetail: '', ////考核项目 |
| | | content: '', ////考核内容 |
| | | judgeStandard: '', ////评定标准 |
| | | }; |
| | | // 安全目标指标弹窗 |
| | | const Shows = ref(); |
| | | const daiInpt = () => { |
| | | Shows.value.openDailog(); |
| | | }; |
| | | // 取消 |
| | | const resetForm = () => { |
| | | dialogVisible.value = false; |
| | | form.value = { |
| | | itemType: '', ////类型 |
| | | memo: '', //备注 |
| | | itemDetail: '', ////考核项目 |
| | | content: '', ////考核内容 |
| | | judgeStandard: '', ////评定标准 |
| | | }; |
| | | }; |
| | | //全屏 |
| | | const full = ref(false); |
| | |
| | | form, |
| | | dialogVisible, |
| | | openDailog, |
| | | activeName, |
| | | tableData, |
| | | Show, |
| | | daiAdd, |
| | | Shows, |
| | | daiInpt, |
| | | submitForm, |
| | | resetForm, |
| | | Search, |
| | | full, |
| | | toggleFullscreen, |