ZengTao
2024-03-31 01bfed8b9977f82d4e13afd9ce95869d34044d2b
Albania_Mes-ui/src/views/home/index.vue
@@ -539,26 +539,23 @@
                <el-table-column :min-width="80" prop="glassWidth" :label="$t('Width')"></el-table-column>
                <el-table-column :min-width="80" prop="glassHeight" :label="$t('Height')"></el-table-column>
                <el-table-column :min-width="80" prop="thickness" :label="$t('Thickness')"></el-table-column>
                <el-table-column :min-width="80" prop="films" :label="$t('Films')"></el-table-column>
                <el-table-column :min-width="80" prop="number" :label="$t('number')"></el-table-column>
                <el-table-column :min-width="80" prop="width" :label="$t('Width')"></el-table-column>
                <el-table-column :min-width="250" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
                            {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="(scope.row.width < scope.row.glassWidth + 100 ? true : false)"
                            @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 1)">{{ $t('Add')
                            }}
                        </el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="scope.row.number >= 1 ? false : true"
                            @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, -1)">{{ $t('Reduce')
                            }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            :disabled="scope.row.number >= 1 ? false : true"
                            @click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 0)">{{ $t('Delete')
@@ -593,23 +590,29 @@
                </el-table-column>
                <el-table-column prop="state" :label="$t('Task State')">
                    <template slot-scope='scope'>
                        {{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Start') : $t('Stop') : "" }}
                        {{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Stop') : $t('Start') : "" }}
                    </template>
                </el-table-column>
                <el-table-column prop="method" :label="$t('Task Method')">
                    <template slot-scope='scope'>
                        {{ scope.row.state >= 0 ? scope.row.method == 0 ? $t('Out') : $t('All Out') : "" }}
                    </template>
                </el-table-column>
                <el-table-column prop="line" :label="$t('Task Line')">
                </el-table-column>
                <el-table-column width="220" :label="$t('Operate')">
                <el-table-column width="300" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-select v-model="selected[scope.$index]" :placeholder="$t('Line')"
                            v-show="scope.row.state >= 0 ? true : false">
                            <el-option v-for="item in options" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            v-show="scope.row.state >= 0 ? true : false"
                            @click="ClaimTasks(scope.row.flowcard, scope.row.state)">
                            {{ scope.row.status == '0' ? $t('Start Task') : $t('Stop Task') }}</el-button>
                            @click="ClaimTasks(scope.row.flowcard, scope.row.state, selected[scope.$index])">
                            {{ scope.row.state > 0 ? $t('Stop Task') : $t('Start Task') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            v-show="scope.row.state >= 0 ? true : false"
@@ -635,6 +638,7 @@
            </div>
            <el-table :data="this.StorageCageAddInfo" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column prop="flowcard" :label="$t('Flowcard')"></el-table-column>
                <el-table-column prop="tier" :label="$t('Tier')"></el-table-column>
                <el-table-column prop="glasstype" :label="$t('GlassType')"></el-table-column>
                <el-table-column prop="width" :label="$t('Width')"></el-table-column>
                <el-table-column prop="height" :label="$t('Height')"></el-table-column>
@@ -670,6 +674,14 @@
    name: "Home",
    data() {
        return {
            selected: [],
            options: [{
                value: '1',
                label: '1'
            }, {
                value: '2',
                label: '2'
            }],
            dataList: [],
            tableData1: [],
            Measuermode: false,
@@ -931,8 +943,8 @@
        },
        //领取/暂停任务
        ClaimTasks(flowcard, state) {
            ClaimTasks(flowcard, state).then(res => {
        ClaimTasks(flowcard, state, line) {
            ClaimTasks(flowcard, state, line).then(res => {
                if (res.data.message == 200) {
                    this.$message.success(this.$t('Operation successful'));
                }