Merge branch 'fly' into xy-ly

master
fanluyan 2 years ago
commit c0fe6addce

@ -505,7 +505,17 @@ export function delUserApi(data) {
}, },
}); });
} }
//获取设备接口
export function getCoordinate(data) {
return request({
url: "/api/getCoordinate",
method: "post",
data,
});
}
//绘制坐标保存 //绘制坐标保存
export function updateCoordinate(data) { export function updateCoordinate(data) {
return request({ return request({
url: "/api/updateCoordinate", url: "/api/updateCoordinate",

@ -196,39 +196,32 @@ export default {
// //
submitForm() { submitForm() {
console.log(this.termidArr); console.log(this.termidArr);
this.timer = window.setInterval(() => {
this.termidArrNum++;
console.log(this.termidArrNum);
if (this.termidArrNum < this.termidArr.length) {
this.sureSum(); this.sureSum();
} else {
this.$message({
showClose: true,
message: "添加成功",
type: "success",
});
this.isShow = false;
this.$parent.deviceList();
clearTimeout(this.timer);
}
}, 1000);
}, },
// //
sureSum() { sureSum() {
setScheduleRulel({ console.log(this.termidArr);
list: [ console.log(this.checkedAisle);
{ var ruleBox = [];
termid: this.termidArr[this.termidArrNum], for (var i = 0; i < this.termidArr.length; i++) {
var parmsobj = {
termid: this.termidArr[i],
channelidlist: [this.checkedAisle], channelidlist: [this.checkedAisle],
}, };
], console.log(parmsobj);
ruleBox.push(parmsobj);
}
console.log(ruleBox);
setScheduleRulel({
list: ruleBox,
scheduleid: this.selid, scheduleid: this.selid,
}) })
.then((res) => { .then((res) => {
console.log(res);
// this.$message({ // this.$message({
// showClose: true, // showClose: true,
// message: '',type: 'success' // message: '',type: 'success'
// });; // });
}) })
.catch((err) => { .catch((err) => {
this.$message({ this.$message({

@ -81,7 +81,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { updateCoordinate } from "@/utils/api/index"; import { updateCoordinate, getCoordinate } from "@/utils/api/index";
export default { export default {
props: { props: {
title: String, title: String,
@ -125,6 +125,7 @@ export default {
this.picsrc = obj.path; this.picsrc = obj.path;
this.channelId = obj.id; this.channelId = obj.id;
this.photoId = obj.photoId; this.photoId = obj.photoId;
this.getcanvansPic(this.pictureData, this.channelId);
// console.log(this.picsrc); // console.log(this.picsrc);
}, },
//线 //线
@ -139,16 +140,36 @@ export default {
}, },
display(val) { display(val) {
this.isShow = true; this.isShow = true;
console.log(val);
this.pictureData = val; // this.pictureData = val; //
this.picoptions = val.list; // this.picoptions = val.list; //
this.picvalue = val.list[0].name; //
this.picsrc = val.list[0].path;
this.channelId = val.list[0].id; this.channelId = val.list[0].id;
this.termId = val.id; this.picvalue = val.list[0].name; //
this.markId = val.markId; this.termId = val.id; //id
this.cmdid = val.cmdid; this.getcanvansPic(val, this.channelId);
this.photoId = val.list[0].photoId; },
hide() {
this.isShow = false;
this.pictureData = "";
this.picoptions = [];
this.picvalue = "";
},
getcanvansPic(val, channelid) {
getCoordinate({
channelId: channelid,
needPic: "0",
termId: this.termId,
})
.then((res) => {
console.log(res);
this.picsrc = res.data.path;
})
.catch((err) => {});
// this.picsrc = val.list[0].path;
// this.markId = val.markId;
// this.cmdid = val.cmdid;
// this.photoId = val.list[0].photoId;
console.log("this.canvas"); console.log("this.canvas");
this.$nextTick(function () { this.$nextTick(function () {
// codeing // codeing
@ -166,13 +187,6 @@ export default {
this.drawline(); this.drawline();
}); });
}, },
hide() {
this.isShow = false;
this.pictureData = "";
this.picoptions = [];
this.picvalue = "";
},
mousedown(e) { mousedown(e) {
//console.log(""); //console.log("");
this.saveDrawingSurface(); this.saveDrawingSurface();

@ -133,7 +133,7 @@
<el-button <el-button
type="text" type="text"
@click.native.stop="handleImageCapture(scope.row)" @click.native.stop="handleImageCapture(scope.row)"
>图像采集装置</el-button >图像采集参数</el-button
> >
<el-button <el-button
type="text" type="text"

@ -1,6 +1,13 @@
const { defineConfig } = require("@vue/cli-service"); const { defineConfig } = require("@vue/cli-service");
const path = require("path"); const path = require("path");
module.exports = defineConfig({ module.exports = defineConfig({
//打包清除console
chainWebpack(config) {
config.optimization.minimizer("terser").tap((args) => {
args[0].terserOptions.compress.drop_console = true;
return args;
});
},
productionSourceMap: false, // 生产环境是否要生成 sourceMap productionSourceMap: false, // 生产环境是否要生成 sourceMap
publicPath: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./", // 部署应用包时的基本 URL publicPath: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./", // 部署应用包时的基本 URL
//assetsPublicPath: process.env.NODE_ENV === "production" ? "" : "/", //assetsPublicPath: process.env.NODE_ENV === "production" ? "" : "/",

Loading…
Cancel
Save