diff --git a/src/components/CardModal/index.vue b/src/components/CardModal/index.vue index 7290e53..722712b 100644 --- a/src/components/CardModal/index.vue +++ b/src/components/CardModal/index.vue @@ -3,10 +3,15 @@ v-bind="getModalOptions" :style="`width:${getModalOptions.width}px`" preset="card" + :title="options.title" @update:show="handleClose" > + + 取消 + 确认 + diff --git a/src/utils/handleData.js b/src/utils/handleData.js index 47b839a..e9a79ec 100644 --- a/src/utils/handleData.js +++ b/src/utils/handleData.js @@ -107,3 +107,26 @@ export function formatTreeData(data, formatter, childKey = 'children') { } return result } + +/** + * 处理select数据 + * @param data 需要处理的数据 + * @params {label: XX, value: XX, children: XX} 需要处理的结构 + * @returns {[]} 处理后的数据 + */ +export function dataToSelect(data, optionsObj) { + const result = [] + if (data && data.length) { + data.forEach((item) => { + const i = {} + i.label = item[optionsObj.label] + i.value = item[optionsObj.value] + if (item.children && item.children.length) { + dataToSelect(item.children, optionsObj) + i.children = item[optionsObj.children] + } + result.push(i) + }) + } + return result +} diff --git a/src/views/login/index.vue b/src/views/login/index.vue index aa48a75..8108522 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -105,7 +105,8 @@ export default { goPage() { // const query = this.$route.query // const path = query && query.from ? query.from : '/' - // this.$router.push(path) + // console.log(path) + // this.$router.replace(path) this.$router.replace('/home') } } diff --git a/src/views/system/user/components/UserModal.vue b/src/views/system/user/components/UserModal.vue index ad97dae..59b9837 100644 --- a/src/views/system/user/components/UserModal.vue +++ b/src/views/system/user/components/UserModal.vue @@ -1,15 +1,147 @@ + diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 45113e1..0df2d95 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -6,15 +6,16 @@ :row-key="(row) => row.id" :request="loadDataTable" size="large" - scroll-x="1200" > + +