| | |
| | | })
|
| | | }
|
| | |
|
| | | export function SelectPassword() {
|
| | | return request({
|
| | | url: '/home/SelectPassword',
|
| | | method: 'get',
|
| | | data :""
|
| | | })
|
| | | }
|
| | |
|
| | |
|
| | |
| | | "Are you sure to perform this operation ?":"Are you sure to perform this operation ?",
|
| | | "prompt":"prompt",
|
| | | "Yes":"Yes",
|
| | | "No":"No"
|
| | | "No":"No",
|
| | | "Please enter the password":"Please enter the password",
|
| | | "Password error":"Password error"
|
| | |
|
| | | } |
| | |
| | | "alarmid": "id",
|
| | | "alacontent": "报警内容",
|
| | | "time-on": "开始时间",
|
| | | "End-Time": "结束时间"
|
| | | "End-Time": "结束时间",
|
| | | "Please enter the password":"请输入密码",
|
| | | "Password error":"密码错误"
|
| | | } |
| | |
| | | :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>
|
| | |
| | | </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,
|
| | |
| | | cageinfo: [],
|
| | | cage: 0,
|
| | | carlist: [],
|
| | | loadglassheight:0
|
| | | loadglassheight: 0,
|
| | | password: 1
|
| | | };
|
| | | },
|
| | | created() {
|
| | |
| | | this.carlist = res.data.carlist;
|
| | | console.log(this.carlist);
|
| | | });
|
| | | SelectPassword().then(res => {
|
| | | this.password = res.data.password;
|
| | | });
|
| | | },
|
| | | //根据格子状态修改颜色
|
| | | getStatusClass(state) {
|
| | |
| | | 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',
|
| | |
| | | });
|
| | | },
|
| | | 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) {
|
| | |
| | | } else {
|
| | | this.$message.success(this.$t('No delete allowed'));
|
| | | }
|
| | | } else {
|
| | | 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(() => {
|
| | | }).then(({ value }) => {
|
| | | if (this.password == value) {
|
| | | if (state == 1) {
|
| | | OutByGlassID(glassid).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | |
| | | } else {
|
| | | this.$message.success(this.$t('No out allowed'));
|
| | | }
|
| | | } else {
|
| | | this.$message.success(this.$t('Password error'));//密码错误
|
| | | }
|
| | | }).catch(() => {
|
| | | this.$message({
|
| | | type: 'info',
|
| | |
| | | map.put("carlist", carlist); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @GetMapping("/SelectPassword") |
| | | public Result SelectPassword() { |
| | | String pwdct = homeMapper.SelectPassword(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("password", pwdct); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Select("select * from car_position") |
| | | List<CarPosition> Loadcarlist(); |
| | | |
| | | @Select("select dianqimima from user where id=1") |
| | | String SelectPassword(); |
| | | |
| | | } |