|
@@ -60,20 +60,34 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { onActivated, ref } from 'vue'
|
|
|
|
|
|
+import { nextTick, onActivated, ref } from 'vue'
|
|
|
|
+import { useRoute } from 'vue-router'
|
|
import { HcDelMsg, HcFirmMsg } from 'hc-vue3-ui'
|
|
import { HcDelMsg, HcFirmMsg } from 'hc-vue3-ui'
|
|
import { getDictionaryData } from '~uti/tools'
|
|
import { getDictionaryData } from '~uti/tools'
|
|
-import { arrToId, getArrValue, isNullES } from 'js-fast-way'
|
|
|
|
|
|
+import { arrToId, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
import HcDataDialog from './modules/user/data.vue'
|
|
import HcDataDialog from './modules/user/data.vue'
|
|
import HcRoleDialog from './modules/user/role.vue'
|
|
import HcRoleDialog from './modules/user/role.vue'
|
|
import deptApi from '~api/system/dept'
|
|
import deptApi from '~api/system/dept'
|
|
import mainApi from '~api/system/user'
|
|
import mainApi from '~api/system/user'
|
|
|
|
|
|
|
|
+//初始组合式
|
|
|
|
+const useRoutes = useRoute()
|
|
|
|
+
|
|
onActivated(()=> {
|
|
onActivated(()=> {
|
|
getUserTypeData()
|
|
getUserTypeData()
|
|
searchClick()
|
|
searchClick()
|
|
|
|
+ setUseRoutes()
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+const setUseRoutes = async () => {
|
|
|
|
+ const query = useRoutes.query
|
|
|
|
+ const { type } = getObjValue(query)
|
|
|
|
+ await nextTick()
|
|
|
|
+ if (type === 'add') {
|
|
|
|
+ addUserClick()
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
//搜索表单
|
|
//搜索表单
|
|
const searchFormType = ref('account')
|
|
const searchFormType = ref('account')
|
|
const searchFormName = ref('')
|
|
const searchFormName = ref('')
|