|
@@ -854,8 +854,10 @@ var info = '';info = wx.getMenuButtonBoundingClientRect();var _default = { data:
|
|
|
// // obj[name + 'name'] = obj[name][e.detail.value].name
|
|
|
// // obj[name + 'id'] = obj[name][e.detail.value].id
|
|
|
// },
|
|
|
- tot: function tot() {var obj = this;if (obj.chang == '') {return obj.$api.msg('请输入长度');}if (obj.kuan == '') {return obj.$api.msg('请输入宽度');}if (obj.gao == '') {return obj.$api.msg('请选择高度');}if (obj.isBaowen == '') {return obj.$api.msg('请选择是否保温');}if (obj.isBaowen == '是') {if (obj.baowenCl == '') {return obj.$api.msg('请选择保温材料');}}if (obj.isGangC == '') {return obj.$api.msg('请选择是否需要钢槽');}if (obj.isGangC == '是') {if (obj.gangcCl == '') {return obj.$api.msg('请选择钢槽材料');}}if (obj.isRent == '') {return obj.$api.msg('请选择是否需要人梯');}if (obj.gebanname == '') {return obj.$api.msg('请选择是否需要隔板');}(0, _index.getDefault)({ high: obj.gao }).then(function (res) {console.log(res, '999999', res.data); // 处理默认值
|
|
|
- if (res.data.roof) {console.log('处理默认值');console.log(res.data.roof);obj.roof = res.data.roof.name;obj.roofId = res.data.roof.id;} else {console.log('清除默认');obj.roof = '';obj.roofId = '';}if (res.data.floor) {obj.floor = res.data.floor.name;obj.floorId = res.data.floor.id;} else {obj.floor = '';obj.floorId = '';}if (res.data.side_plate) {obj.sideplate = res.data.side_plate;} else {obj.sideplate = [];}if (res.data.column) {obj.column = res.data.column.name;obj.columnId = res.data.column.id;} else {obj.column = '';obj.columnId = '';}if (res.data.lacing) {obj.lacing = res.data.lacing;} else {obj.lacing = [];}if (res.data.fula) {obj.fula = res.data.fula;} else {obj.fula = [];}});obj.tabcurrent = 1;}, too: function too() {var obj = this;obj.tabcurrent = 0;}, toth: function toth() {var obj = this;if (obj.loading) {return;}var lacing = obj.lacing.map(function (item) {return item.id;});var fula = obj.fula.map(function (item) {return item.id;});var side_plate = obj.sideplate.map(function (item) {return item.id;});console.log(lacing, 'lacing++++');obj.loading = true;uni.showLoading({ title: '计算中...' });(0, _index.calculation)({ long: obj.chang, //长
|
|
|
+ tot: function tot() {var obj = this;if (obj.chang == '') {return obj.$api.msg('请输入长度');}if (obj.kuan == '') {return obj.$api.msg('请输入宽度');}if (obj.gao == '') {return obj.$api.msg('请选择高度');}if (obj.isBaowen == '') {return obj.$api.msg('请选择是否保温');}if (obj.isBaowen == '是') {if (obj.baowenCl == '') {return obj.$api.msg('请选择保温材料');}}if (obj.isGangC == '') {return obj.$api.msg('请选择是否需要钢槽');}if (obj.isGangC == '是') {if (obj.gangcCl == '') {return obj.$api.msg('请选择钢槽材料');}}if (obj.isRent == '') {return obj.$api.msg('请选择是否需要人梯');}if (obj.gebanname == '') {return obj.$api.msg('请选择是否需要隔板');}if (obj.type == 1) {obj.tabcurrent = 1;} else {(0, _index.getDefault)({ high: obj.gao }).then(function (res) {console.log(res, '999999', res.data); // 处理默认值
|
|
|
+ if (res.data.roof) {console.log('处理默认值');console.log(res.data.roof);obj.roof = res.data.roof.name;obj.roofId = res.data.roof.id;} else {console.log('清除默认');obj.roof = '';obj.roofId = '';}if (res.data.floor) {obj.floor = res.data.floor.name;obj.floorId = res.data.floor.id;} else {obj.floor = '';obj.floorId = '';}if (res.data.side_plate) {obj.sideplate = res.data.side_plate;} else {obj.sideplate = [];}if (res.data.column) {obj.column = res.data.column.name;obj.columnId = res.data.column.id;} else {obj.column = '';obj.columnId = '';}if (res.data.lacing) {obj.lacing = res.data.lacing;} else {obj.lacing = [];}if (res.data.fula) {obj.fula = res.data.fula;} else {obj.fula = [];}obj.tabcurrent = 1;});}}, too: function too() {var obj = this;obj.tabcurrent = 0;}, toth: function toth() {var obj = this;if (obj.loading) {return;}var lacing = obj.lacing.map(function (item) {return item.id;});var fula = obj.fula.map(function (item) {return item.id;});var side_plate = obj.sideplate.map(function (item) {return item.id;});if (obj.roof == '') {return obj.$api.msg('请选择顶板厚度');}if (obj.floor == '') {return obj.$api.msg('请选择底板厚度');} // 判断侧板是否完整
|
|
|
+ var cblen = Math.ceil(obj.gao);if (side_plate.length < cblen) {return obj.$api.msg('请选择侧板厚度');}if (obj.column == '') {return obj.$api.msg('请选择立柱厚度');} //判断辅拉,主拉是否完整
|
|
|
+ var lalen = Math.ceil(obj.gao) - 1;console.log(lalen, 'lalen');if (lacing.length < lalen) {return obj.$api.msg('请选择主拉厚度');}if (fula.length < lalen) {return obj.$api.msg('请选择辅拉厚度');}console.log(lacing, 'lacing++++');obj.loading = true;uni.showLoading({ title: '计算中...' });(0, _index.calculation)({ long: obj.chang, //长
|
|
|
wide: obj.kuan, high: obj.gao, is_warm: obj.isBaowen == '是' ? 1 : 0, warm: obj.baowenClId, is_channel: obj.isGangC == '是' ? 1 : 0, channel: obj.gangcClId, is_human_ladder: obj.isRent == '是' ? 1 : 0, is_gc: obj.type, floor: obj.floorId, roof: obj.roofId, column: obj.columnId, lacing: lacing, fula: fula, side_plate: side_plate }).then(function (res) {console.log(res);uni.hideLoading();obj.jsjg = res.data;obj.tabcurrent = 2;}).catch(function (err) {uni.hideLoading();obj.loading = false;});}, endjs: function endjs() {uni.switchTab({ url: '/pages/index/index' });}, openKf: function openKf() {}, getZyList: function getZyList() {var obj = this;(0, _index.getZyList)({ is_gc: obj.type }).then(function (res) {console.log(res);obj.warmList = res.data.warm; //保温材料
|
|
|
obj.channelList = res.data.channel; //钢槽材料
|
|
|
obj.roofList = res.data.roof; //顶板厚度
|
|
@@ -863,12 +865,37 @@ var info = '';info = wx.getMenuButtonBoundingClientRect();var _default = { data:
|
|
|
obj.sideplateList = res.data.side_plate; //侧板厚度
|
|
|
obj.columnList = res.data.column; //立柱厚度
|
|
|
obj.lacingList = res.data.lacing; //主拉厚度
|
|
|
- obj.fulaList = res.data.fula;});} }, _defineProperty(_methods, "openKf", function openKf() {this.$refs.popupkf.open();}), _defineProperty(_methods, "cancel", function cancel() {this.$refs.popupkf.close();}), _defineProperty(_methods, "comfirm", function comfirm(text) {console.log(text);var result = this.uniCopy(text);if (result === false) {uni.showToast({ title: '不支持' });} else {uni.showToast({ title: '复制成功', icon: 'none' });}this.$refs.popupkf.close();}), _defineProperty(_methods, "uniCopy", function uniCopy(content) {/**
|
|
|
- * 小程序端 和 app端的复制逻辑
|
|
|
- */uni.setClipboardData({ data: content, success: function success() {console.log('success');return true;} });
|
|
|
+ obj.fulaList = res.data.fula;});} }, _defineProperty(_methods, "openKf", function openKf() {this.$refs.popupkf.open();}), _defineProperty(_methods, "cancel", function cancel() {this.$refs.popupkf.close();}), _defineProperty(_methods, "comfirm", function comfirm(text) {console.log(text);
|
|
|
+ var result = this.uniCopy(text);
|
|
|
+ if (result === false) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '不支持' });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '复制成功',
|
|
|
+ icon: 'none' });
|
|
|
+
|
|
|
+ }
|
|
|
+ this.$refs.popupkf.close();
|
|
|
+ }), _defineProperty(_methods, "uniCopy", function uniCopy(
|
|
|
+ content) {
|
|
|
+ /**
|
|
|
+ * 小程序端 和 app端的复制逻辑
|
|
|
+ */
|
|
|
+
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: content,
|
|
|
+ success: function success() {
|
|
|
+ console.log('success');
|
|
|
+ return true;
|
|
|
+ } });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
- * H5端的复制逻辑
|
|
|
- */
|
|
|
+ * H5端的复制逻辑
|
|
|
+ */
|
|
|
|
|
|
|
|
|
|