| | |
| | | }
|
| | | }
|
| | |
|
| | | .el-dialog{
|
| | | .el-dialog {
|
| | | width: 80%;
|
| | | }
|
| | | </style>
|
| | |
| | | <div class="box" @click="dialogFormVisible2 = true">
|
| | | <div class="text">
|
| | | <!-- Alarm: -->
|
| | | {{ this.text }}
|
| | | <label v-for="item in this.alarm" :key="item['id']">
|
| | | {{ item['content'] }}
|
| | | </label>
|
| | |
| | | <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist4" :key="item['date']"
|
| | | :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="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
|
| | | <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
|
| | |
| | | </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'
|
| | |
| | | name: "Home",
|
| | | data() {
|
| | | return {
|
| | | name: 'Confirm',
|
| | | mixins: [LanguageMixin],
|
| | | dialogFormVisible: false,
|
| | | dialogFormVisible1: false,
|
| | |
| | | // car2: 300,
|
| | | cageinfo: [],
|
| | | cage: 0,
|
| | | carlist: []
|
| | | carlist: [],
|
| | | loadglassheight: 0,
|
| | | password: 1,
|
| | | text: ""
|
| | | };
|
| | | },
|
| | | created() {
|
| | |
| | | this.tasklist1 = obj.tasklist1[0];
|
| | | this.tasklist2 = obj.tasklist2[0];
|
| | | this.alarm = obj.alarmmg[0];
|
| | | this.loadglassheight = obj.loadglassheight;
|
| | |
|
| | | if (obj.dbconnected == "false") {
|
| | | this.text = this.$t('DataBase Connection failed');
|
| | | }
|
| | | SelectCageInfo(this.cage).then(res => {
|
| | | this.cageinfo = res.data.cageinfo;
|
| | | });
|
| | |
| | | Loadcarlist().then(res => {
|
| | | this.carlist = res.data.carlist;
|
| | | console.log(this.carlist);
|
| | | });
|
| | | SelectPassword().then(res => {
|
| | | this.password = res.data.password;
|
| | | });
|
| | | },
|
| | | //根据格子状态修改颜色
|
| | |
| | | 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(() => {
|
| | | UpdateTask(type, glassid, cell).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | | });
|
| | | }).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',
|
| | | message: this.$t('Operation canceled')
|
| | | });
|
| | | });
|
| | |
|
| | | },
|
| | | showcageinfo(cage) {
|
| | | this.cage = cage;
|
| | |
| | | });
|
| | | },
|
| | | 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(() => {
|
| | | if (state == 1) {
|
| | | DeleteByGlassID(glassid).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | | });
|
| | | }).then(({ value }) => {
|
| | | if (this.password == value) {
|
| | | if (state == 1) {
|
| | | DeleteByGlassID(glassid).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | | });
|
| | | } else {
|
| | | this.$message.success(this.$t('No delete allowed'));
|
| | | }
|
| | | } else {
|
| | | this.$message.success(this.$t('No delete allowed'));
|
| | | this.$message.success(this.$t('Password error'));//密码错误
|
| | | }
|
| | |
|
| | | }).catch(() => {
|
| | | this.$message({
|
| | | type: 'info',
|
| | |
| | | });
|
| | | },
|
| | | 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(() => {
|
| | | if (state == 1) {
|
| | | OutByGlassID(glassid).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | | else if (res.data.message2 == 300) {
|
| | | this.$message.success(this.$t('There is no such grid'));
|
| | | }
|
| | | });
|
| | | }).then(({ value }) => {
|
| | | if (this.password == value) {
|
| | | if (state == 1) {
|
| | | OutByGlassID(glassid).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | | else if (res.data.message2 == 300) {
|
| | | this.$message.success(this.$t('There is no such grid'));
|
| | | }
|
| | | });
|
| | | } else {
|
| | | this.$message.success(this.$t('No out allowed'));
|
| | | }
|
| | | } else {
|
| | | this.$message.success(this.$t('No out allowed'));
|
| | | this.$message.success(this.$t('Password error'));//密码错误
|
| | | }
|
| | | }).catch(() => {
|
| | | this.$message({
|