ZengTao
2023-09-18 36298f8ee1b0607960dfa33792854320b80850e6
CanadaMes-ui/src/views/home/index.vue
@@ -265,7 +265,9 @@
                        :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index + Math.abs(item['cage'] - 5) * 6.8 + 'px' }"
                        @click="showcageinfo(item['cage'])"></div>
                </div>
                <div class="blue gezi" :style="{display:flex,position: absolute,float:left,top: 105 +'px',left: 1050 +'px',height: loadglassheight+'px',width: 5+'px'}"></div>
                <div class="blue gezi"
                    :style="{ display: flex, position: absolute, float: left, top: 105 + 'px', left: 1050 + 'px', height: loadglassheight + 'px', width: 5 + 'px' }">
                </div>
                <div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
                <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
                <div class="blocks-img2"></div>
@@ -367,7 +369,7 @@
</template>
<script>
import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist } from "../../api/home";
import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword } from "../../api/home";
import LanguageMixin from '../../lang/LanguageMixin'
@@ -376,6 +378,7 @@
    name: "Home",
    data() {
        return {
            name: 'Confirm',
            mixins: [LanguageMixin],
            dialogFormVisible: false,
            dialogFormVisible1: false,
@@ -411,7 +414,8 @@
            cageinfo: [],
            cage: 0,
            carlist: [],
            loadglassheight:0
            loadglassheight: 0,
            password: 1
        };
    },
    created() {
@@ -507,6 +511,9 @@
                this.carlist = res.data.carlist;
                console.log(this.carlist);
            });
            SelectPassword().then(res => {
                this.password = res.data.password;
            });
        },
        //根据格子状态修改颜色
        getStatusClass(state) {
@@ -590,16 +597,22 @@
            this.form1 = {};
        },
        endtask(type, glassid, cell) {
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
            }).then(() => {
            }).then(({ value }) => {
                if (this.password == value) {
                UpdateTask(type, glassid, cell).then(res => {
                    if (res.data.message3 == 200) {
                        this.$message.success(this.$t('Operation successful'));
                    }
                });
                } else {
                    this.$message.success(this.$t('Password error'));//密码错误
                }
            }).catch(() => {
                this.$message({
                    type: 'info',
@@ -616,11 +629,14 @@
            });
        },
        deleteglass(glassid, state) {
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
            }).then(() => {
            }).then(({ value }) => {
                if (this.password == value) {
                if (state == 1) {
                    DeleteByGlassID(glassid).then(res => {
                        if (res.data.message3 == 200) {
@@ -630,6 +646,10 @@
                } else {
                    this.$message.success(this.$t('No delete allowed'));
                }
                } else {
                    this.$message.success(this.$t('Password error'));//密码错误
                }
            }).catch(() => {
                this.$message({
                    type: 'info',
@@ -638,11 +658,14 @@
            });
        },
        outglass(glassid, state) {
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
                confirmButtonText: this.$t('Yes'),
                cancelButtonText: this.$t('No'),
                type: 'warning'
            }).then(() => {
            }).then(({ value }) => {
                if (this.password == value) {
                if (state == 1) {
                    OutByGlassID(glassid).then(res => {
                        if (res.data.message3 == 200) {
@@ -655,6 +678,9 @@
                } else {
                    this.$message.success(this.$t('No out allowed'));
                }
                } else {
                    this.$message.success(this.$t('Password error'));//密码错误
                }
            }).catch(() => {
                this.$message({
                    type: 'info',