From 63e60190437ffac6ed6f4b6abd2c8baf5004a3cb Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 04 三月 2024 10:06:29 +0800
Subject: [PATCH] 登录页验证码位置修改
---
src/views/dashboard/components/ProcessInfo.vue | 63 ++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 11 deletions(-)
diff --git a/src/views/dashboard/components/ProcessInfo.vue b/src/views/dashboard/components/ProcessInfo.vue
index 95ba326..92bb945 100644
--- a/src/views/dashboard/components/ProcessInfo.vue
+++ b/src/views/dashboard/components/ProcessInfo.vue
@@ -11,29 +11,58 @@
<div v-if="craftModel.isUpdate" class="tip-r">
<img src="~@/assets/images/process-tip.png" />
</div>
- <div v-if="craftModel.isUpdate" class="tip-current">褰撳墠浣跨敤</div>
+ <div v-if="craftModel.number == task?.Procedure?.processModelNumber" class="tip-current">褰撳墠浣跨敤</div>
<div class="btn">
- <el-button type="primary" @click="onUpdateClick"> 鏇存柊宸ヨ壓 </el-button>
+ <!-- <el-button
+ type="primary"
+ :loading="loading"
+ :disabled="craftModel.isUpdate ? false : true"
+ @click="onUpdateClick"
+ >
+ 鏇存柊宸ヨ壓
+ </el-button> -->
</div>
</div>
</template>
<script setup lang="ts">
-import { toRefs } from 'vue'
+import { toRefs, ref, watch } from 'vue'
+import { Loading } from '@element-plus/icons-vue'
import type { CraftModel } from '@/api/craftModel'
+import type { Task } from '@/api/task'
const props = defineProps<{
craftModel: CraftModel
+ activeArr: string[]
+ task?: Task
}>()
-const { craftModel } = toRefs(props)
+const { craftModel, task, activeArr } = toRefs(props)
const emit = defineEmits<{
update: [craftModel: CraftModel]
detail: [craftModel: CraftModel]
}>()
-
+const loading = ref(false)
+watch(activeArr.value, () => {
+ // 寮圭獥鏄剧ず鏃惰幏鍙栧伐鑹哄弬鏁�
+ if (activeArr.value) {
+ getLoading()
+ }
+})
+function getLoading() {
+ for (let i in activeArr.value) {
+ if (activeArr.value[i] == craftModel.value.number) {
+ loading.value = true
+ return true
+ }
+ }
+ loading.value = false
+}
function onDetailClick() {
emit('detail', craftModel.value)
}
function onUpdateClick() {
+ if (loading.value) {
+ return true
+ }
emit('update', craftModel.value)
}
</script>
@@ -42,13 +71,14 @@
$status-running: #f76c0f;
$status-done: #2c5dbb82;
$status-ready: #00ff00f0;
+$status-disabled: #7b95d3;
.font_weight {
font-weight: 600;
}
.process-info {
- width: calc(50% - 35px);
- height: 110px;
- padding: 23px 10px 10px;
+ width: calc(50% - 10px);
+ height: 140px;
+ padding: 23px 5px 10px 10px;
background: $status-done;
border-radius: 8px;
//float: left;
@@ -58,7 +88,7 @@
margin-bottom: 30px;
&:nth-of-type(odd) {
- margin-right: 30px;
+ margin-right: 20px;
}
.item-l-bng {
@@ -69,6 +99,11 @@
img {
width: 100%;
}
+ }
+ .refresh-top-icon {
+ display: flex;
+ align-items: center;
+ color: #fff;
}
.item-r {
@@ -112,14 +147,20 @@
}
.btn {
- width: 100px;
+ width: 95px;
position: absolute;
- right: 0px;
+ right: 15px;
bottom: 10px;
.el-button--primary {
background: $status-running;
border: 0 !important;
}
+ .el-button.is-disabled,
+ .el-button.is-disabled:focus,
+ .el-button.is-disabled:hover {
+ color: #fff !important;
+ background: $status-disabled;
+ }
}
}
</style>
--
Gitblit v1.8.0