diff --git a/src/views/server/employeehosts/index.vue b/src/views/server/employeehosts/index.vue
index 00ddf60..8c4d86b 100644
--- a/src/views/server/employeehosts/index.vue
+++ b/src/views/server/employeehosts/index.vue
@@ -132,6 +132,7 @@
删除本页
+ 复制且转化
@@ -162,7 +163,7 @@
- 复制
+ 复制
@@ -253,7 +254,7 @@
{{ $t('employee.hostsId') }}:{{ item.hostsId }}
- 复制id
+ 复制id
@@ -276,9 +277,9 @@
{{ $t('employee.updateTime') }}:{{ formatTimestamp(item.updateTime) }}
{{ $t('employee.edit')
- }}
+ }}
{{ $t('employee.delete')
- }}
+ }}
@@ -309,6 +310,7 @@ import MobilePagination from '@/components/MobilePagination.vue'
import { useDictStore } from '@/store/modules/dict' // 如果你项目里有字典 store
const dictStore = useDictStore?.() // 有就用;没有的话把 dictStore 相关行删掉
+let isUpdata = ref(false)
// 统一用字符串比较,自动识别并翻译 i18n key
function dictLabelI18n(type: string, val: any) {
const v = val == null ? '' : String(val)
@@ -617,7 +619,7 @@ function AllocationFun() {
console.log(selectHostList.value)
}
-function handleCopy(text) {
+function handleCopy(text, data) {
// fallback 兼容方案
const textarea = document.createElement('textarea')
textarea.value = text
@@ -629,6 +631,12 @@ function handleCopy(text) {
const result = document.execCommand('copy')
if (result) {
ElMessage.success('✅复制成功 ')
+ if (isUpdata.value) {
+ EmployeeHostsApi.updateEmployeeHosts({ id: data.id, userId: data.userId, hostsId: data.hostsId, operationStatus: 1 }).then(res => {
+ getList()
+ })
+ }
+
} else {
ElMessage.error('❌复制失败')
}