廖井涛
4 天以前 4955996ab044bc275ac78da3543b9d9f5ad7f8d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<script setup>
import {useI18n} from "vue-i18n"
import {computed} from "vue";
const { t } = useI18n()
let props = defineProps({
  craftObj:null,
  process:null,
})
const resetCraft = () => {
  props.craftObj.newCraft = []
}
const emit = defineEmits(['saveCraft'])
const save = () => {
  emit('saveCraft')
}
 
const newCraftComputed = computed(() =>{
  return props.craftObj.newCraft.join('->') || null
})
const oldCraftComputed = computed(() =>{
  return props.craftObj.oldCraft.join('->') || null
})
 
</script>
 
<template>
  <div style="width: 100%;height: 100%">
    <h5>{{$t('craft.processAttribute')}}</h5>
    <el-checkbox
        v-model="craftObj.newCraft"
        v-for="item in process"
        :label="item.basicName"
        class="glass-process-checkbox"
        size="small" />
 
    <el-row style="width: 90%;border: 0;position: absolute;bottom: 1rem; left: 50%;transform: translateX(-50%);">
 
        <span class="ml-3 w-35 text-gray-600 inline-flex items-center"
        >{{$t('craft.oldProcess')}}:
        </span>
      <el-input :value="oldCraftComputed" disabled class="w-50 m-2" />
      <span class="ml-3 w-35 text-gray-600 inline-flex items-center"
      >{{$t('craft.newProcess')}}:
        </span>
      <el-input :value="newCraftComputed" disabled class="w-50 m-2" />
      <el-col style="margin-top: 0.5rem">
        <el-button type="primary" @click="resetCraft">{{$t('craft.reset')}}</el-button>
        <el-button type="primary" @click="save">{{$t('basicData.save')}}</el-button>
      </el-col>
    </el-row>
 
  </div>
 
</template>
 
<style scoped>
 
</style>