|
@@ -47,10 +47,8 @@
|
|
|
<script setup>
|
|
|
import { onMounted, ref, watch } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { NewDelMsg } from 'hc-vue3-ui'
|
|
|
-import { arrToId, deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
-import { getBizDictionary } from '~api/other'
|
|
|
-import projectApi from '~api/project/project'
|
|
|
+import { HcFirmMsg, NewDelMsg } from 'hc-vue3-ui'
|
|
|
+import { arrToId, deepClone, getArrValue, getObjValue, isNullES, setCopyText } from 'js-fast-way'
|
|
|
import contractApi from '~api/project/contract'
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -213,13 +211,29 @@ const addUserClick = () => {
|
|
|
}
|
|
|
|
|
|
//复制
|
|
|
-const copyRowClick = (row) => {
|
|
|
-
|
|
|
+const copyRowClick = ({ name, account, password }) => {
|
|
|
+ const isRes = setCopyText(`姓名:${name}
|
|
|
+账号:${account}
|
|
|
+密码:${password}`)
|
|
|
+ if (isRes) {
|
|
|
+ window?.$message?.success('复制成功')
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('复制失败')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//重置密码
|
|
|
const resetRowClick = (row) => {
|
|
|
-
|
|
|
+ HcFirmMsg({
|
|
|
+ title: '操作确认',
|
|
|
+ text: '是否将用户【' + row.name + '】密码重置为123456?',
|
|
|
+ }, async (resolve) => {
|
|
|
+ const { isRes } = await contractApi.resetPasswordByUserId(row.uid)
|
|
|
+ resolve() //关闭弹窗的回调
|
|
|
+ if (!isRes) return
|
|
|
+ row.password = '123456'
|
|
|
+ window.$message.success('重置成功')
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
//全部删除
|