|
@@ -26,10 +26,7 @@
|
|
|
<span>注销账户</span>
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- <HcTable :column="tableColumn" :datas="tableData" isCheck @selection-change="tableSelectionChange">
|
|
|
- <template #name="{row}">{{ row['name'] }}</template>
|
|
|
- <template #text="{row}">{{ row['text'] }}</template>
|
|
|
- <template #color="{row}">{{ row['color'] }}</template>
|
|
|
+ <HcTable :column="tableColumn" :datas="tableData" isCheck @selection-change="tableSelectionChange" :loading="tableLoaing">
|
|
|
<template #action="{row, index}">
|
|
|
<el-button size="small" type="primary" @click="eidtModal">编辑</el-button>
|
|
|
</template>
|
|
@@ -108,13 +105,34 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {ref, watch} from "vue";
|
|
|
+import {ref, watch,onMounted} from "vue";
|
|
|
import {isPhone} from "js-fast-way"
|
|
|
-
|
|
|
+import {getSelectUserlist} from '~api/system/user.js';
|
|
|
+import {getArrValue} from "js-fast-way"
|
|
|
+onMounted(() => {
|
|
|
+
|
|
|
+ getTableData()
|
|
|
+
|
|
|
+})
|
|
|
const value = ref('')
|
|
|
+const tableLoaing=ref(false)
|
|
|
+const getTableData=async()=>{
|
|
|
+ tableLoaing.value=true
|
|
|
+ const { error, code, data,msg } = await getSelectUserlist({
|
|
|
+ ...searchForm.value
|
|
|
+ })
|
|
|
+ tableLoaing.value=false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ console.log(data,'data');
|
|
|
+ tableData.value = getArrValue(data['records'])
|
|
|
+ searchForm.value.total=data['total']
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ window.$message?.warning(msg)
|
|
|
+ }
|
|
|
|
|
|
+}
|
|
|
const searchForm = ref({
|
|
|
- postType: '', name: '',
|
|
|
current: 1, size: 20, total: 0
|
|
|
})
|
|
|
|
|
@@ -122,6 +140,7 @@ const searchForm = ref({
|
|
|
const pageChange = ({current, size}) => {
|
|
|
searchForm.value.current = current
|
|
|
searchForm.value.size = size
|
|
|
+ getTableData()
|
|
|
}
|
|
|
const postOptions = ref([
|
|
|
{label: '所有', value: '1'},
|
|
@@ -139,13 +158,13 @@ const options = ref([
|
|
|
])
|
|
|
|
|
|
const searchClick = () => {
|
|
|
-
|
|
|
+ getTableData()
|
|
|
}
|
|
|
const keyUpEvent = () => {
|
|
|
|
|
|
}
|
|
|
const tableColumn = [
|
|
|
- {key: 'name', name: '用户名称'},
|
|
|
+ {key: 'dictName', name: '用户名称'},
|
|
|
{key: 'name', name: '账号ID'},
|
|
|
{key: 'name', name: '密码'},
|
|
|
{key: 'text', name: '所属部门'},
|
|
@@ -154,11 +173,8 @@ const tableColumn = [
|
|
|
{key: 'text', name: '启用状态'},
|
|
|
{key: 'action', name: '操作', width: 100}
|
|
|
]
|
|
|
-const tableData = ref([
|
|
|
- {name: '名称1', text: '文本1', color: 'red'},
|
|
|
- {name: '名称2', text: '文本2', color: 'blue'},
|
|
|
- {name: '名称3', text: '文本3', color: '无'}
|
|
|
-])
|
|
|
+
|
|
|
+const tableData = ref([])
|
|
|
const tableCheckedKeys = ref([]);
|
|
|
const tableSelectionChange = (rows) => {
|
|
|
tableCheckedKeys.value = rows
|