修改输入框的placeholder
Showing
5 changed files
with
208 additions
and
3 deletions
| ... | @@ -142,6 +142,25 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -142,6 +142,25 @@ const routes: RouteRecordRaw[] = [ |
| 142 | cache: true | 142 | cache: true |
| 143 | }, | 143 | }, |
| 144 | }, | 144 | }, |
| 145 | { | ||
| 146 | path: 'anon-task-create', | ||
| 147 | name: 'anonTaskCreate', | ||
| 148 | component: () => import('@/views/data_anonymization/anonTaskCreate.vue'), | ||
| 149 | meta: { | ||
| 150 | title: '新建匿名化处理任务', | ||
| 151 | sidebar: false, | ||
| 152 | breadcrumb: false, | ||
| 153 | cache: true, | ||
| 154 | reuse: true, | ||
| 155 | editPage: true, | ||
| 156 | activeMenu: '/data-anonymization/result-process' | ||
| 157 | }, | ||
| 158 | beforeEnter: (to, from) => { | ||
| 159 | if (to.query.taskName) { | ||
| 160 | to.meta.title = `编辑-${to.query.taskName}`; | ||
| 161 | } | ||
| 162 | } | ||
| 163 | }, | ||
| 145 | ], | 164 | ], |
| 146 | }, | 165 | }, |
| 147 | ] | 166 | ] | ... | ... |
| 1 | <route lang="yaml"> | ||
| 2 | name: anonTaskCreate | ||
| 3 | </route> | ||
| 4 | |||
| 5 | <script lang="ts" setup name="anonTaskCreate"> | ||
| 6 | import { | ||
| 7 | dataSourceTypeList | ||
| 8 | } from '@/api/modules/dataAnonymization'; | ||
| 9 | import useUserStore from "@/store/modules/user"; | ||
| 10 | |||
| 11 | const { proxy } = getCurrentInstance() as any; | ||
| 12 | const userStore = useUserStore(); | ||
| 13 | const route = useRoute(); | ||
| 14 | const router = useRouter(); | ||
| 15 | const fullPath = route.fullPath; | ||
| 16 | |||
| 17 | const fullscreenLoading = ref(false); | ||
| 18 | |||
| 19 | const step = ref(0); | ||
| 20 | const stepsInfo = ref({ | ||
| 21 | step: step.value, | ||
| 22 | list: [ | ||
| 23 | { title: '数据输入', value: 1 }, | ||
| 24 | { title: '配置匿名化方案', value: 2 }, | ||
| 25 | { title: '匿名结果分析', value: 3 }, | ||
| 26 | { title: '结果输出', value: 4 } | ||
| 27 | ] | ||
| 28 | }) | ||
| 29 | |||
| 30 | const dataSourceList = ref([]); | ||
| 31 | |||
| 32 | /** 数据共享类型字段列表 */ | ||
| 33 | const dataSharingTypeList = ref([]); | ||
| 34 | |||
| 35 | /** 数据选择的表单配置信息 */ | ||
| 36 | const dataSelectInfoItems = ref([{ | ||
| 37 | label: '任务名称', | ||
| 38 | type: 'input', | ||
| 39 | placeholder: '请输入', | ||
| 40 | field: 'taskName', | ||
| 41 | maxlength: 15, | ||
| 42 | default: '', | ||
| 43 | required: true, | ||
| 44 | filterable: true, | ||
| 45 | clearable: true, | ||
| 46 | visible: true, | ||
| 47 | }, { | ||
| 48 | label: '数据共享类型', | ||
| 49 | type: 'select', | ||
| 50 | placeholder: '请选择', | ||
| 51 | field: 'dataSharingTypeCode', | ||
| 52 | default: '', | ||
| 53 | options: dataSharingTypeList, | ||
| 54 | props: { | ||
| 55 | label: "label", | ||
| 56 | value: "value", | ||
| 57 | }, | ||
| 58 | required: true, | ||
| 59 | filterable: true, | ||
| 60 | clearable: true, | ||
| 61 | visible: true, | ||
| 62 | }, { | ||
| 63 | label: '数据来源', | ||
| 64 | type: 'select', | ||
| 65 | placeholder: '请选择', | ||
| 66 | field: 'dataSource', | ||
| 67 | default: 1, | ||
| 68 | options: dataSourceTypeList, | ||
| 69 | props: { | ||
| 70 | label: "label", | ||
| 71 | value: "value", | ||
| 72 | }, | ||
| 73 | required: true, | ||
| 74 | filterable: true, | ||
| 75 | clearable: true, | ||
| 76 | visible: true, | ||
| 77 | }, { | ||
| 78 | label: '数据源', | ||
| 79 | type: 'select', | ||
| 80 | placeholder: '请选择', | ||
| 81 | field: 'dataSourceGuid', | ||
| 82 | default: '', | ||
| 83 | options: dataSourceList.value, | ||
| 84 | props: { | ||
| 85 | label: 'databaseNameZh', | ||
| 86 | value: 'guid' | ||
| 87 | }, | ||
| 88 | filterable: true, | ||
| 89 | visible: true, | ||
| 90 | required: true | ||
| 91 | }, { | ||
| 92 | label: '文件上传', | ||
| 93 | tip: '支持扩展名:xlsx、xls、csv,文件大小不超过10MB', | ||
| 94 | type: 'upload-file', | ||
| 95 | accept: '.xlsx, .xls, .csv', | ||
| 96 | limitSize: 10, | ||
| 97 | isExcel: true, | ||
| 98 | required: true, | ||
| 99 | default: <any>[], | ||
| 100 | block: true, | ||
| 101 | visible: false, | ||
| 102 | field: 'file', | ||
| 103 | }]); | ||
| 104 | |||
| 105 | const dataSelectInfoFormRules = ref({ | ||
| 106 | |||
| 107 | }); | ||
| 108 | |||
| 109 | const changeStep = (val) => { | ||
| 110 | |||
| 111 | } | ||
| 112 | |||
| 113 | const exportResult = () => { | ||
| 114 | |||
| 115 | } | ||
| 116 | |||
| 117 | const cancelTask = () => { | ||
| 118 | proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => { | ||
| 119 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 120 | router.push({ | ||
| 121 | name: 'resultProcess' | ||
| 122 | }); | ||
| 123 | }, () => { | ||
| 124 | proxy.$ElMessage.info("已取消"); | ||
| 125 | }); | ||
| 126 | } | ||
| 127 | |||
| 128 | </script> | ||
| 129 | |||
| 130 | <template> | ||
| 131 | <div class="container_wrap full" v-loading="fullscreenLoading"> | ||
| 132 | <div class="content_main"> | ||
| 133 | <div class="top_tool_wrap"> | ||
| 134 | <StepBar :steps-info="stepsInfo" /> | ||
| 135 | </div> | ||
| 136 | <div class="operator_panel_wrap" v-show="step == 0"> | ||
| 137 | <ContentWrap id="id-baseInfo" title="数据选择" description="" style="margin-top: 8px;"> | ||
| 138 | <Form ref="formRef" :itemList="dataSelectInfoItems" :rules="dataSelectInfoFormRules" formId="model-select-edit" col="col3" /> | ||
| 139 | </ContentWrap> | ||
| 140 | </div> | ||
| 141 | </div> | ||
| 142 | <div class="bottom_tool_wrap"> | ||
| 143 | <template v-if="step == 0"> | ||
| 144 | <el-button @click="cancelTask">取消</el-button> | ||
| 145 | <el-button type="primary" @click="changeStep(2)">下一步</el-button> | ||
| 146 | </template> | ||
| 147 | <template v-else> | ||
| 148 | <el-button @click="cancelTask">取消</el-button> | ||
| 149 | <el-button type="primary" @click="changeStep(1)">上一步</el-button> | ||
| 150 | <el-button type="primary" v-preReClick @click="exportResult">导出</el-button> | ||
| 151 | </template> | ||
| 152 | </div> | ||
| 153 | </div> | ||
| 154 | </template> | ||
| 155 | |||
| 156 | <style lang="scss" scoped> | ||
| 157 | .top_tool_wrap { | ||
| 158 | width: 100%; | ||
| 159 | height: 72px; | ||
| 160 | margin: 8px 0 0px; | ||
| 161 | display: flex; | ||
| 162 | justify-content: center; | ||
| 163 | align-items: center; | ||
| 164 | |||
| 165 | :deep(.el-steps) { | ||
| 166 | width: 60%; | ||
| 167 | } | ||
| 168 | } | ||
| 169 | |||
| 170 | .bottom_tool_wrap { | ||
| 171 | height: 40px; | ||
| 172 | padding: 0 16px; | ||
| 173 | border-top: 1px solid #d9d9d9; | ||
| 174 | display: flex; | ||
| 175 | justify-content: center; | ||
| 176 | align-items: center; | ||
| 177 | } | ||
| 178 | |||
| 179 | .content_main { | ||
| 180 | height: calc(100% - 40px); | ||
| 181 | padding: 0 16px; | ||
| 182 | overflow: hidden auto; | ||
| 183 | } | ||
| 184 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -222,7 +222,7 @@ const tablePageChange = (info) => { | ... | @@ -222,7 +222,7 @@ const tablePageChange = (info) => { |
| 222 | const newCreateLabelFormItems = ref<any>([{ | 222 | const newCreateLabelFormItems = ref<any>([{ |
| 223 | label: '标签名称', | 223 | label: '标签名称', |
| 224 | type: 'input', | 224 | type: 'input', |
| 225 | placeholder: '请选择', | 225 | placeholder: '请输入', |
| 226 | field: 'labelName', | 226 | field: 'labelName', |
| 227 | default: '', | 227 | default: '', |
| 228 | required: true, | 228 | required: true, | ... | ... |
| ... | @@ -156,7 +156,9 @@ const tablePageChange = (info) => { | ... | @@ -156,7 +156,9 @@ const tablePageChange = (info) => { |
| 156 | }; | 156 | }; |
| 157 | 157 | ||
| 158 | const handleCreate = () => { | 158 | const handleCreate = () => { |
| 159 | 159 | router.push({ | |
| 160 | name: 'anonTaskCreate' | ||
| 161 | }); | ||
| 160 | } | 162 | } |
| 161 | 163 | ||
| 162 | onBeforeMount(() => { | 164 | onBeforeMount(() => { | ... | ... |
| ... | @@ -198,7 +198,7 @@ const dataSourceList = ref([]); | ... | @@ -198,7 +198,7 @@ const dataSourceList = ref([]); |
| 198 | const newCreateTaskFormItems = ref([{ | 198 | const newCreateTaskFormItems = ref([{ |
| 199 | label: '任务名称', | 199 | label: '任务名称', |
| 200 | type: 'input', | 200 | type: 'input', |
| 201 | placeholder: '请选择', | 201 | placeholder: '请输入', |
| 202 | field: 'taskName', | 202 | field: 'taskName', |
| 203 | maxlength: 15, | 203 | maxlength: 15, |
| 204 | default: '', | 204 | default: '', | ... | ... |
-
Please register or sign in to post a comment