add calculation module and fix many bugs

This commit is contained in:
Amir Mohamadi
2021-01-27 18:51:06 +03:30
parent 9433eb84ac
commit 08a17401aa
70 changed files with 7133 additions and 5528 deletions
+30 -30
View File
@@ -5,6 +5,16 @@ const fs = require('fs')
const jimp = require('jimp') const jimp = require('jimp')
const v_m = require('../validation_messages') const v_m = require('../validation_messages')
// local variables
const shortDescriptionLength = 500
const coverWidth = 1920
const coverHeight = 720
const coverQuality = 70
const thumbWith = 460
const thumbHeight = 320
module.exports.create = [ module.exports.create = [
[ [
// title // title
@@ -39,13 +49,9 @@ module.exports.create = [
// short description // short description
body('fa_short_description') body('fa_short_description')
.notEmpty().withMessage(v_m['fa'].required.description) .notEmpty().withMessage(v_m['fa'].required.description),
.bail()
.isLength({max: 200}).withMessage(v_m['fa'].max_char.max200),
body('en_short_description') body('en_short_description')
.notEmpty().withMessage(v_m['fa'].required.description) .notEmpty().withMessage(v_m['fa'].required.description),
.bail()
.isLength({max: 200}).withMessage(v_m['fa'].max_char.max200),
body('category') body('category')
.notEmpty().withMessage(v_m['fa'].required.category) .notEmpty().withMessage(v_m['fa'].required.category)
@@ -57,9 +63,6 @@ module.exports.create = [
let cover let cover
let coverName let coverName
// 460 X 320
// 1920 x 720
if (req.files && req.files.cover) { if (req.files && req.files.cover) {
cover = req.files.cover cover = req.files.cover
coverName = 'blog_' + Date.now() + '.' + cover.mimetype.split('/')[1] coverName = 'blog_' + Date.now() + '.' + cover.mimetype.split('/')[1]
@@ -70,11 +73,11 @@ module.exports.create = [
jimp.read(cover.data) jimp.read(cover.data)
.then(img => { .then(img => {
img img
.cover(1920, 720) .cover(coverWidth, coverHeight)
.quality(70) .quality(coverQuality)
.write(`./static/uploads/images/blog/${coverName}`) .write(`./static/uploads/images/blog/${coverName}`)
.resize(460, jimp.AUTO) .resize(thumbWith, jimp.AUTO)
.cover(460, 320) .cover(thumbWith, thumbHeight)
.write(`./static/uploads/images/blog/thumb_${coverName}`) .write(`./static/uploads/images/blog/thumb_${coverName}`)
}) })
@@ -83,12 +86,12 @@ module.exports.create = [
fa: { fa: {
title: req.body.fa_title, title: req.body.fa_title,
description: req.body.fa_description, description: req.body.fa_description,
short_description: req.body.fa_short_description short_description: req.body.fa_short_description.slice(0, shortDescriptionLength) + ' ... '
}, },
en: { en: {
title: req.body.en_title, title: req.body.en_title,
description: req.body.en_description, description: req.body.en_description,
short_description: req.body.en_short_description short_description: req.body.en_short_description.slice(0, shortDescriptionLength) + ' ... '
} }
}, },
cover: coverName, cover: coverName,
@@ -161,13 +164,9 @@ module.exports.update = [
// short description // short description
body('fa_short_description') body('fa_short_description')
.notEmpty().withMessage(v_m['fa'].required.description) .notEmpty().withMessage(v_m['fa'].required.description),
.bail()
.isLength({max: 200}).withMessage(v_m['fa'].max_char.max200),
body('en_short_description') body('en_short_description')
.notEmpty().withMessage(v_m['fa'].required.description) .notEmpty().withMessage(v_m['fa'].required.description),
.bail()
.isLength({max: 200}).withMessage(v_m['fa'].max_char.max200),
body('category') body('category')
@@ -183,12 +182,12 @@ module.exports.update = [
fa: { fa: {
title: req.body.fa_title, title: req.body.fa_title,
description: req.body.fa_description, description: req.body.fa_description,
short_description: req.body.fa_short_description short_description: req.body.fa_short_description.slice(0, shortDescriptionLength) + ' ... '
}, },
en: { en: {
title: req.body.en_title, title: req.body.en_title,
description: req.body.en_description, description: req.body.en_description,
short_description: req.body.en_short_description short_description: req.body.en_short_description.slice(0, shortDescriptionLength) + ' ... '
} }
}, },
published: req.body.published, published: req.body.published,
@@ -196,9 +195,6 @@ module.exports.update = [
updated_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss') updated_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss')
} }
// 460 X 320
// 1920 x 720
let cover let cover
let coverName let coverName
@@ -210,10 +206,11 @@ module.exports.update = [
jimp.read(cover.data) jimp.read(cover.data)
.then(img => { .then(img => {
img img
.cover(1920, 720) .cover(coverWidth, coverHeight)
.quality(coverQuality)
.write(`./static/uploads/images/blog/${coverName}`) .write(`./static/uploads/images/blog/${coverName}`)
.resize(460, jimp.AUTO) .resize(thumbWith, jimp.AUTO)
.cover(460, 320) .cover(thumbWith, thumbHeight)
.write(`./static/uploads/images/blog/thumb_${coverName}`) .write(`./static/uploads/images/blog/thumb_${coverName}`)
}) })
} }
@@ -228,7 +225,10 @@ module.exports.update = [
if (err) console.log(err) if (err) console.log(err)
}) })
} }
return res.json({message: v_m['fa'].response.success_save}) BlogPost.findById(oldData._id, (err, newData) => {
if (err) console.log(err)
return res.json(newData)
})
}) })
} }
] ]
+658 -20
View File
@@ -2,34 +2,672 @@ const {body, validationResult} = require('express-validator')
const v_m = require('../validation_messages') const v_m = require('../validation_messages')
const validationMessages = { const validationMessages = {
fa: {}, fa: {
en: {} method: 'روش محاسبه را انتخاب کنید',
method_not_supported: 'روش انتخاب شده پشتیبانی نشده است',
gratingType: 'نوع گریتینک را انتخاب کنید',
gratingType_not_supported: 'نوع گریتینگ پشتیبانی نشده است',
loadType: 'نوع فشار را وارد کنید',
class: 'کلاس را انتخاب کنید',
pointedLoad: 'مقدار بار متمرکز را وارد کنید',
distributedLoad: 'مقدار بار گسترده را وارد کنید',
bearingBarThickness: 'ضخامت تسمه باربر را وارد کنید',
bearingBarPitch: 'گام تسمه باربر را انتخاب کنید',
bearingBarPitch_not_ok: 'مقدار گام تسمه باربر صحیح نیست',
crossBarPitch: 'گام تسمه رابط را تنخاب کنید',
crossBarPitch_not_ok: 'مقدار گام تسمه رابط صحیح نیست',
bearingBarHeight: 'ارتفاع تسمه باربر را انتخاب کنید',
bearingBarHeight_not_ok: 'مقدار ارتفاع تسمه باربر صحیح نیست',
clearSpan: 'مقدار دهنه را وارد کنید',
sigma_ok: 'تنش مجاز',
sigma_out_of_range: 'تنش خارج از حد مجاز',
deflection_ok: 'خیز مجاز',
deflection_out_of_range: 'خیز خارج از حد مجاز'
},
en: {
method: 'Choose calculation method',
method_not_supported: 'Chosen calculation method not supported',
gratingType: 'Select the type of grating',
gratingType_not_supported: 'Grating type not supported',
loadType: 'Enter load type',
class: 'Select class',
pointedLoad: 'Enter the amount of pointed load',
distributedLoad: 'Enter the amount of distributed load',
bearingBarThickness: 'Enter bearing bar thickness',
bearingBarPitch: 'Select bearing bar pitch',
bearingBarPitch_not_ok: 'Bearing bar pitch value is incorrect',
crossBarPitch: 'Select cross bar pitch',
crossBarPitch_not_ok: 'Cross bar pitch value is incorrect',
bearingBarHeight: 'Select bearing bar height',
bearingBarHeight_not_ok: 'Bearing bar height is incorrect',
clearSpan: 'Enter clear span',
sigma_ok: 'Tension OK',
sigma_out_of_range: 'Tension Out Of Range',
deflection_ok: 'Deflection OK',
deflection_out_of_range: 'Deflection Out Of Range'
}
} }
module.exports = [ const values = {
// ArakRail products
bearingBarPitch_forge: [30, 35, 41, 50],
bearingBarPitch_pressured: [11, 22, 33, 44, 50, 55],
// defined in formula
crossBarPitch_forge: [38, 50, 76, 100],
crossBarPitch_pressured: [11, 22, 33, 44, 50, 55, 66, 77, 88, 100],
// defined in formula
bearingBarHeight: [20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
}
function relativeBearingBarHeight(gratingType, crossBarPitch) {
// defined in formula
bearingBarHeight = values.bearingBarHeight
const CBPitch = Number(crossBarPitch)
if (gratingType === 'forge') {
if (CBPitch === 38) return bearingBarHeight.filter(item => item <= 80)
else return bearingBarHeight.filter(item => item <= 60)
} else if (gratingType === 'pressured') {
if (
CBPitch === 11 ||
CBPitch === 22 ||
CBPitch === 55 ||
CBPitch === 77 ||
CBPitch === 88
) return bearingBarHeight.filter(item => item <= 60)
else if (
CBPitch === 33 ||
CBPitch === 44 ||
CBPitch === 50 ||
CBPitch === 66 ||
CBPitch === 100
) return bearingBarHeight
}
}
module.exports.calculate = [
[ [
body('method') body('method')
.notEmpty().withMessage(), .notEmpty().withMessage((value, {req}) => {
body('type') return validationMessages[req.body.locale].method
.notEmpty().withMessage(), })
body('class') .bail()
.notEmpty().withMessage(), .custom((value, {req}) => {
body('pointLoad') if (value === 'custom' || value === 'classified') return true
.notEmpty().withMessage(), else return Promise.reject(validationMessages[req.body.locale].method_not_supported)
body('distributedLoad') }),
.notEmpty().withMessage(), body('gratingType')
body('bearingBarPitch') .notEmpty().withMessage((value, {req}) => {
.notEmpty().withMessage(), return validationMessages[req.body.locale].gratingType
body('crossBarPitCh') })
.notEmpty().withMessage(), .bail()
body('clearSpan') .custom((value, {req}) => {
.notEmpty().withMessage(), if (value === 'forge' || value === 'pressured') return true
else return Promise.reject(validationMessages[req.body.locale].gratingType_not_supported)
}),
body('loadType')
.custom((value, {req}) => {
if (req.body.method === 'custom') {
if (value === 'pointedLoad' || value === 'distributedLoad') return true
else return Promise.reject(validationMessages[req.body.locale].loadType)
} else return true
}),
body('vehicleClass')
.custom((value, {req}) => {
if (req.body.method === 'classified') {
const classes = ['class1', 'class2', 'class3', 'class4', 'FL1', 'FL2', 'FL3', 'FL4', 'FL5', 'FL6']
if (classes.includes(value)) return true
else return Promise.reject(validationMessages[req.body.locale].class)
} else return true
}),
body('pointedLoadValue')
.custom((value, {req}) => {
if (req.body.method === 'custom') {
if (req.body.loadType === 'pointedLoad' && !value) return Promise.reject(validationMessages[req.body.locale].pointedLoad)
else return true
} else return true
})
.bail()
.if((value, {req}) => req.body.method === 'custom' && req.body.loadType === 'pointedLoad')
.isNumeric().withMessage((value, {req}) => {
return v_m[req.body.locale].format.number
}),
body('distributedLoadValue')
.custom((value, {req}) => {
if (req.body.method === 'custom') {
if (req.body.loadType === 'distributedLoad' && !value) return Promise.reject(validationMessages[req.body.locale].distributedLoad)
else return true
} else return true
})
.bail()
.if((value, {req}) => req.body.method === 'custom' && req.body.loadType === 'distributedLoad')
.isNumeric().withMessage((value, {req}) => {
return v_m[req.body.locale].format.number
}),
body('bearingBarThickness') body('bearingBarThickness')
.notEmpty().withMessage(), .notEmpty().withMessage((value, {req}) => {
return validationMessages[req.body.locale].bearingBarThickness
})
.bail()
.isNumeric().withMessage((value, {req}) => {
return v_m[req.body.locale].format.number
}),
body('bearingBarPitch')
.notEmpty().withMessage((value, {req}) => {
return validationMessages[req.body.locale].bearingBarPitch
})
.bail()
.isNumeric().withMessage((value, {req}) => {
return v_m[req.body.locale].format.number
})
.bail()
.custom((value, {req}) => {
if (req.body.gratingType === 'forge') {
if (values.bearingBarPitch_forge.includes(Number(value))) return true
else return Promise.reject(validationMessages[req.body.locale].bearingBarPitch_not_ok)
} else {
if (values.bearingBarPitch_pressured.includes(Number(value))) return true
else return Promise.reject(validationMessages[req.body.locale].bearingBarPitch_not_ok)
}
}),
body('crossBarPitch')
.notEmpty().withMessage((value, {req}) => {
return validationMessages[req.body.locale].crossBarPitch
})
.bail()
.isNumeric().withMessage((value, {req}) => {
return v_m[req.body.locale].format.number
})
.bail()
.custom((value, {req}) => {
if (req.body.gratingType === 'forge') {
if (values.crossBarPitch_forge.includes(Number(value))) return true
else return Promise.reject(validationMessages[req.body.locale].crossBarPitch_not_ok)
} else {
if (values.crossBarPitch_pressured.includes(Number(value))) return true
else return Promise.reject(validationMessages[req.body.locale].crossBarPitch_not_ok)
}
}),
body('bearingBarHeight') body('bearingBarHeight')
.notEmpty().withMessage() .notEmpty().withMessage((value, {req}) => {
return validationMessages[req.body.locale].bearingBarHeight
})
.bail()
.isNumeric().withMessage((value, {req}) => {
return v_m[req.body.locale].format.number
})
.bail()
.custom((value, {req}) => {
if (relativeBearingBarHeight(req.body.gratingType, req.body.crossBarPitch).includes(Number(value))) return true
else return Promise.reject(validationMessages[req.body.locale].bearingBarHeight_not_ok)
}),
body('clearSpan')
.notEmpty().withMessage((value, {req}) => {
return validationMessages[req.body.locale].clearSpan
})
.bail()
.isNumeric().withMessage((value, {req}) => {
return v_m[req.body.locale].format.number
})
], ],
(req, res) => { (req, res) => {
const errors = validationResult(req)
if (!errors.isEmpty()) return res.status(422).json({validation: errors.mapped()})
let method = req.body.method
let gratingType = req.body.gratingType
let loadType = req.body.loadType
let vehicleClass = req.body.vehicleClass
let bearingBarHeight = req.body.bearingBarHeight
let bearingBarThickness = req.body.bearingBarThickness
let bearingBarPitch = req.body.bearingBarPitch
let crossBarPitch = req.body.crossBarPitch
let clearSpan = req.body.clearSpan
let locale = req.body.locale
///////// classified vehicles
const vehiclesClasses = {
'class1': {
distributedLoad: 6
},
'class2': {
pointedLoad: 10,
c4: 200,
d4: 200
},
'class3': {
pointedLoad: 30,
c4: 200,
d4: 400
},
'class4': {
pointedLoad: 90,
c4: 250,
d4: 600
},
'FL1': {
pointedLoad: 26,
c4: 130,
d4: 130
},
'FL2': {
pointedLoad: 40,
c4: 150,
d4: 175
},
'FL3': {
pointedLoad: 63,
c4: 200,
d4: 200
},
'FL4': {
pointedLoad: 90,
c4: 200,
d4: 300
},
'FL5': {
pointedLoad: 140,
c4: 200,
d4: 375
},
'FL6': {
pointedLoad: 170,
c4: 200,
d4: 450
},
}
///////// pointed load
function pointedLoad() {
// static variables
const forge = gratingType === 'forge'
const custom = method === 'custom'
// computing m | c4 | d4 | pointedLoadValue
function m_pressured(bearingBarHeight, crossBarPitch) {
const CBPitch = Number(crossBarPitch)
const BBHeight = Number(bearingBarHeight)
if (BBHeight === 20) {
if (CBPitch === 11) return 4.00
if (CBPitch === 22) return 4.00
if (CBPitch === 33) return 3.33
if (CBPitch === 44) return 2.50
if (CBPitch === 50) return 2.22
if (CBPitch === 55) return 2.00
if (CBPitch === 66) return 1.68
if (CBPitch === 77) return 1.43
if (CBPitch === 88) return 1.25
if (CBPitch === 100) return 1.11
} else if (BBHeight === 25) {
if (CBPitch === 11) return 3.85
if (CBPitch === 22) return 3.85
if (CBPitch === 33) return 3.25
if (CBPitch === 44) return 2.45
if (CBPitch === 50) return 2.17
if (CBPitch === 55) return 1.95
if (CBPitch === 66) return 1.62
if (CBPitch === 77) return 1.40
if (CBPitch === 88) return 1.21
if (CBPitch === 100) return 1.08
} else if (BBHeight === 30) {
if (CBPitch === 11) return 3.80
if (CBPitch === 22) return 3.77
if (CBPitch === 33) return 3.17
if (CBPitch === 44) return 2.40
if (CBPitch === 50) return 2.15
if (CBPitch === 55) return 1.90
if (CBPitch === 66) return 1.58
if (CBPitch === 77) return 1.35
if (CBPitch === 88) return 1.19
if (CBPitch === 100) return 1.06
} else if (BBHeight === 35) {
if (CBPitch === 11) return 3.75
if (CBPitch === 22) return 3.75
if (CBPitch === 33) return 3.08
if (CBPitch === 44) return 2.32
if (CBPitch === 50) return 2.05
if (CBPitch === 55) return 1.86
if (CBPitch === 66) return 1.54
if (CBPitch === 77) return 1.33
if (CBPitch === 88) return 1.17
if (CBPitch === 100) return 1.02
} else if (BBHeight === 40) {
if (CBPitch === 11) return 3.70
if (CBPitch === 22) return 3.65
if (CBPitch === 33) return 3.00
if (CBPitch === 44) return 2.25
if (CBPitch === 50) return 2.00
if (CBPitch === 55) return 1.80
if (CBPitch === 66) return 1.52
if (CBPitch === 77) return 1.28
if (CBPitch === 88) return 1.12
if (CBPitch === 100) return 1.01
} else if (BBHeight === 45) {
if (CBPitch === 11) return 3.65
if (CBPitch === 22) return 3.50
if (CBPitch === 33) return 2.92
if (CBPitch === 44) return 2.18
if (CBPitch === 50) return 1.95
if (CBPitch === 55) return 1.75
if (CBPitch === 66) return 1.46
if (CBPitch === 77) return 1.25
if (CBPitch === 88) return 1.09
if (CBPitch === 100) return 0.97
} else if (BBHeight === 50) {
if (CBPitch === 11) return 3.45
if (CBPitch === 22) return 3.41
if (CBPitch === 33) return 2.83
if (CBPitch === 44) return 2.10
if (CBPitch === 50) return 1.88
if (CBPitch === 55) return 1.69
if (CBPitch === 66) return 1.42
if (CBPitch === 77) return 1.22
if (CBPitch === 88) return 1.06
if (CBPitch === 100) return 0.94
} else if (BBHeight === 55) {
if (CBPitch === 11) return 3.28
if (CBPitch === 22) return 3.26
if (CBPitch === 33) return 2.75
if (CBPitch === 44) return 2.08
if (CBPitch === 50) return 1.84
if (CBPitch === 55) return 1.66
if (CBPitch === 66) return 1.39
if (CBPitch === 77) return 1.18
if (CBPitch === 88) return 1.04
if (CBPitch === 100) return 0.92
} else if (BBHeight === 60) {
if (CBPitch === 11) return 3.20
if (CBPitch === 22) return 3.18
if (CBPitch === 33) return 2.67
if (CBPitch === 44) return 1.98
if (CBPitch === 50) return 1.76
if (CBPitch === 55) return 1.59
if (CBPitch === 66) return 1.35
if (CBPitch === 77) return 1.14
if (CBPitch === 88) return 0.99
if (CBPitch === 100) return 0.89
} else if (BBHeight === 65) {
if (CBPitch === 33) return 2.58
if (CBPitch === 44) return 1.93
if (CBPitch === 50) return 1.71
if (CBPitch === 66) return 1.30
if (CBPitch === 100) return 0.86
} else if (BBHeight === 70) {
if (CBPitch === 33) return 2.50
if (CBPitch === 44) return 1.88
if (CBPitch === 50) return 1.66
if (CBPitch === 66) return 1.25
if (CBPitch === 100) return 0.83
} else if (BBHeight === 75) {
if (CBPitch === 33) return 2.42
if (CBPitch === 44) return 1.82
if (CBPitch === 50) return 1.62
if (CBPitch === 66) return 1.20
if (CBPitch === 100) return 0.81
} else if (BBHeight === 80) {
if (CBPitch === 33) return 2.33
if (CBPitch === 44) return 1.75
if (CBPitch === 50) return 1.58
if (CBPitch === 66) return 1.15
if (CBPitch === 100) return 0.78
} else if (BBHeight === 85) {
if (CBPitch === 33) return 2.25
if (CBPitch === 44) return 1.71
if (CBPitch === 50) return 1.52
if (CBPitch === 66) return 1.13
if (CBPitch === 100) return 0.75
} else if (BBHeight === 90) {
if (CBPitch === 33) return 2.17
if (CBPitch === 44) return 1.67
if (CBPitch === 50) return 1.45
if (CBPitch === 66) return 1.11
if (CBPitch === 100) return 0.72
} else if (BBHeight === 95) {
if (CBPitch === 33) return 2.08
if (CBPitch === 44) return 1.59
if (CBPitch === 50) return 1.39
if (CBPitch === 66) return 1.05
if (CBPitch === 100) return 0.69
} else if (BBHeight === 100) {
if (CBPitch === 33) return 2.00
if (CBPitch === 44) return 1.50
if (CBPitch === 50) return 1.33
if (CBPitch === 66) return 0.99
if (CBPitch === 100) return 0.66
}
}
function m_forge(bearingBarHeight, crossBarPitch) {
const CBPitch = Number(crossBarPitch)
const BBHeight = Number(bearingBarHeight)
if (BBHeight === 20) {
if (CBPitch === 38) return 2.25
if (CBPitch === 50) return 1.35
if (CBPitch === 76) return 0.81
if (CBPitch === 100) return 0.52
} else if (BBHeight === 25) {
if (CBPitch === 38) return 2.19
if (CBPitch === 50) return 1.28
if (CBPitch === 76) return 0.77
if (CBPitch === 100) return 0.52
} else if (BBHeight === 30) {
if (CBPitch === 38) return 2.13
if (CBPitch === 50) return 1.25
if (CBPitch === 76) return 0.75
if (CBPitch === 100) return 0.48
} else if (BBHeight === 35) {
if (CBPitch === 38) return 2.06
if (CBPitch === 50) return 1.20
if (CBPitch === 76) return 0.71
if (CBPitch === 100) return 0.47
} else if (BBHeight === 40) {
if (CBPitch === 38) return 2.00
if (CBPitch === 50) return 1.17
if (CBPitch === 76) return 0.67
if (CBPitch === 100) return 0.45
} else if (BBHeight === 45) {
if (CBPitch === 38) return 1.94
if (CBPitch === 50) return 1.11
if (CBPitch === 76) return 0.65
if (CBPitch === 100) return 0.43
} else if (BBHeight === 50) {
if (CBPitch === 38) return 1.88
if (CBPitch === 50) return 1.05
if (CBPitch === 76) return 0.62
if (CBPitch === 100) return 0.40
} else if (BBHeight === 55) {
if (CBPitch === 38) return 1.81
if (CBPitch === 50) return 1.03
if (CBPitch === 76) return 0.61
if (CBPitch === 100) return 0.38
} else if (BBHeight === 60) {
if (CBPitch === 38) return 1.75
if (CBPitch === 50) return 1.00
if (CBPitch === 76) return 0.59
if (CBPitch === 100) return 0.36
} else if (BBHeight === 65) {
if (CBPitch === 38) return 1.69
} else if (BBHeight === 70) {
if (CBPitch === 38) return 1.63
} else if (BBHeight === 75) {
if (CBPitch === 38) return 1.56
} else if (BBHeight === 80) {
if (CBPitch === 38) return 1.50
}
}
let m = () => {
if (forge) return m_forge(bearingBarHeight, crossBarPitch)
else return m_pressured(bearingBarHeight, crossBarPitch)
}
const c4 = () => {
if (custom) return 200
else return vehiclesClasses[vehicleClass].c4
}
const d4 = () => {
if (custom) return 200
else return vehiclesClasses[vehicleClass].d4
}
const pointedLoadValue = () => {
if (custom) return req.body.pointedLoadValue
else return vehiclesClasses[vehicleClass].pointedLoad
}
/////////////////////////////////////////////////////////////// computed variables
const MaxM = (((pointedLoadValue() * 1000) * (clearSpan - (d4() / 2))) / 4) * 1.5
const n = (c4() / bearingBarPitch) + m()
const W = () => {
const temp = (((bearingBarThickness * Math.pow(bearingBarHeight, 2)) / 6) * n)
return forge ? temp : (temp * 0.9)
}
const sigma = MaxM / W()
const L = () => {
const temp = (((bearingBarThickness * (Math.pow(bearingBarHeight, 3))) / 12) * n)
return forge ? temp : (temp * 0.9)
}
const D = ((pointedLoadValue() * 1000) / (384 * 210000 * L())) * ((8 * Math.pow(clearSpan, 3)) - (4 * clearSpan * Math.pow(d4(), 2)) + (Math.pow(d4(), 3)))
// console.log('m =' + m())
// console.log('c4 =' + c4())
// console.log('d4 =' + d4())
// console.log('pointedLoadValue =' + pointedLoadValue())
// console.log('MaxM =' + MaxM)
// console.log('n =' + n)
// console.log('W =' + W())
// console.log('sigma =' + sigma)
// console.log('L =' + L())
// console.log('D =' + D)
//////////////////////////////////////////////////////////////// calculate result
const result = {
sigma: null,
sigmaStatus: null,
deflection: null,
deflectionStatus: null
}
if (sigma < 235) {
result.sigma = validationMessages[locale].sigma_ok
result.sigmaStatus = true
} else {
result.sigma = validationMessages[locale].sigma_out_of_range
result.sigmaStatus = false
}
if (D < (clearSpan / 200)) {
result.deflection = validationMessages[locale].deflection_ok
result.deflectionStatus = true
} else {
result.deflection = validationMessages[locale].deflection_out_of_range
result.deflectionStatus = false
}
return result
}
///////// distributed load
function distributedLoad() {
// static variables
const forge = gratingType === 'forge'
const custom = method === 'custom'
// computing distributedLoadValue
const distributedLoadValue = () => {
if (custom) return req.body.distributedLoadValue
else return vehiclesClasses[vehicleClass].distributedLoad
}
////////////////////////////////////////////////////////////////// computed variables
const MaxM = (((distributedLoadValue() * 10) * bearingBarPitch * Math.pow(clearSpan, 2)) / 80000) * 1.5
const W = () => {
const temp = (bearingBarThickness * Math.pow(bearingBarHeight, 2)) / 6
return forge ? temp : (temp * 0.9)
}
const sigma = MaxM / W()
const L = () => {
const temp = (bearingBarThickness * Math.pow(bearingBarHeight, 3)) / 12
return forge ? temp : (temp * 0.9)
}
const D = (5 * distributedLoadValue() * bearingBarPitch * Math.pow(clearSpan, 4)) / (384 * 21000 * L() * Math.pow(10, 4))
////////////////////////////////////////////////////////////////// calculate result
const result = {
sigma: null,
sigmaStatus: null,
deflection: null,
deflectionStatus: null
}
if (sigma < 235) {
result.sigma = validationMessages[locale].sigma_ok
result.sigmaStatus = true
} else {
result.sigma = validationMessages[locale].sigma_out_of_range
result.sigmaStatus = false
}
if (D < (clearSpan / 200)) {
result.deflection = validationMessages[locale].deflection_ok
result.deflectionStatus = true
} else {
result.deflection = validationMessages[locale].deflection_out_of_range
result.deflectionStatus = false
}
return result
}
////////////////////////////////////////////// calculate
if (method === 'custom') {
if (loadType === 'pointedLoad') return res.json(pointedLoad())
else return res.json(distributedLoad())
} else if (method === 'classified') {
if (vehicleClass === 'class1') return res.json(distributedLoad())
else return res.json(pointedLoad())
} else return res.json({message: 'unsupported entry'})
} }
] ]
module.exports.getRelativeValues = [
[
body('gratingType')
.notEmpty().withMessage((value, {req}) => {
return validationMessages[req.body.locale].gratingType
})
.bail()
.custom((value, {req}) => {
if (value === 'forge' || value === 'pressured') return true
else Promise.reject(validationMessages[req.body.locale].gratingType_not_supported)
}),
body('crossBarPitch')
.notEmpty().withMessage((value, {req}) => {
return validationMessages[req.body.locale].crossBarPitch
})
.bail()
.custom((value, {req}) => {
if (req.body.gratingType === 'forge') {
if (values.crossBarPitch_forge.includes(Number(value))) return true
else return Promise.reject(validationMessages[req.body.locale].crossBarPitch_not_ok)
} else {
if (values.crossBarPitch_pressured.includes(Number(value))) return true
else return Promise.reject(validationMessages[req.body.locale].crossBarPitch_not_ok)
}
})
],
(req, res) => {
const errors = validationResult(req)
if (!errors.isEmpty()) return res.status(422).json(errors.mapped())
return res.json(relativeBearingBarHeight(req.body.gratingType, req.body.crossBarPitch))
}
]
module.exports.getValues = [
(req, res) => {
return res.json(values)
}
]
+10 -4
View File
@@ -5,6 +5,10 @@ const jimp = require('jimp')
const fs = require('fs') const fs = require('fs')
const v_m = require('../validation_messages') const v_m = require('../validation_messages')
// local variables
const imageWidth = 648
const imageHeight = 443
const imageQuality = 100
module.exports.create = [ module.exports.create = [
[ [
@@ -49,8 +53,9 @@ module.exports.create = [
jimp.read(req.files.image.data) jimp.read(req.files.image.data)
.then(img => { .then(img => {
img img
.resize(380, jimp.AUTO) .resize(imageWidth, jimp.AUTO)
.cover(380, 260) .cover(imageWidth, imageHeight)
.quality(imageQuality)
.write(`./static/uploads/images/history/${fileName}`, cb => { .write(`./static/uploads/images/history/${fileName}`, cb => {
const history = new History(data) const history = new History(data)
history.save(err => { history.save(err => {
@@ -128,8 +133,9 @@ module.exports.update = [
jimp.read(req.files.image.data) jimp.read(req.files.image.data)
.then(img => { .then(img => {
img img
.resize(380, jimp.AUTO) .resize(imageWidth, jimp.AUTO)
.cover(380, 260) .cover(imageWidth, imageHeight)
.quality(imageQuality)
.write(`./static/uploads/images/history/${fileName}`, cb => { .write(`./static/uploads/images/history/${fileName}`, cb => {
History.findByIdAndUpdate(req.params.id, data, (err, oldData) => { History.findByIdAndUpdate(req.params.id, data, (err, oldData) => {
if (err) console.log(err) if (err) console.log(err)
+13 -11
View File
@@ -12,24 +12,27 @@ module.exports.create = [
MainCatalog.find({}, (err, catalogs) => { MainCatalog.find({}, (err, catalogs) => {
if (catalogs.length) { if (catalogs.length) {
let firstFile = catalogs[0] let firstFile = catalogs[0]
fs.unlink(`./static/${firstFile.file}`, err => {
if (firstFile.file[req.body.locale]) fs.unlink(`./static/${firstFile.file[req.body.locale]}`, err => {
if (err) console.log(err) if (err) console.log(err)
firstFile.file = req.files.pdf.name })
firstFile.created_at = dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss')
firstFile.file[req.body.locale] = req.body.locale + '_' + req.files.pdf.name
firstFile.updated_at = dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss')
firstFile.save((err1, data) => { firstFile.save((err1, data) => {
if (err1) console.log(err1) if (err1) console.log(err1)
req.files.pdf.mv(`./static/uploads/pdf/${req.files.pdf.name}`) req.files.pdf.mv(`./static/uploads/pdf/${req.body.locale}_${req.files.pdf.name}`)
return res.json(firstFile) return res.json(firstFile)
}) })
})
} else { } else {
new MainCatalog({ const data = {created_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss'), file: {}}
file: req.files.pdf.name, data.file[req.body.locale] = req.body.locale + '_' + req.files.pdf.name
created_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss')
}).save((err, data) => { new MainCatalog(data).save((err, data) => {
if (err) console.log(err) if (err) console.log(err)
req.files.pdf.mv(`./static/uploads/pdf/${req.files.pdf.name}`) req.files.pdf.mv(`./static/uploads/pdf/${req.body.locale}_${req.files.pdf.name}`)
return res.json(data) return res.json(data)
}) })
} }
@@ -38,7 +41,6 @@ module.exports.create = [
} }
] ]
module.exports.get = [ module.exports.get = [
(req, res) => { (req, res) => {
MainCatalog.find({}, (err, catalog) => { MainCatalog.find({}, (err, catalog) => {
+2 -1
View File
@@ -78,7 +78,8 @@ module.exports.update = [
en: { en: {
name: req.body.en_name name: req.body.en_name
} }
} },
updated_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss')
} }
ProductCategory.findByIdAndUpdate(req.params.id, data, (err, oldData) => { ProductCategory.findByIdAndUpdate(req.params.id, data, (err, oldData) => {
+158 -72
View File
@@ -5,6 +5,27 @@ const jimp = require('jimp')
const fs = require('fs') const fs = require('fs')
const v_m = require('../validation_messages') const v_m = require('../validation_messages')
// local variables
const shortDescriptionLength = 150
const coverWidth = 1010
const coverHeight = 534
const coverQuality = 100
const thumbWidth = 360
const thumbHeight = 294
const thumbQuality = 70
const moreSectionWidth = 778
const moreSectionHeight = 395
const moreSectionQuality = 70
const renderImageWidth = 300
const renderImageHeight = 300
const renderImageQuality = 70
const chartImageQuality = 100
////////////////////////////////////////// products controllers ////////////////////////////////////////// products controllers
module.exports.createProduct = [ module.exports.createProduct = [
[ [
@@ -31,14 +52,10 @@ module.exports.createProduct = [
}), }),
body('fa_short_description') body('fa_short_description')
.notEmpty().withMessage(v_m['fa'].required.caption) .notEmpty().withMessage(v_m['fa'].required.caption),
.bail()
.isLength({max: 100}).withMessage(v_m['fa'].max_char.max100),
body('en_short_description') body('en_short_description')
.notEmpty().withMessage(v_m['fa'].required.caption) .notEmpty().withMessage(v_m['fa'].required.caption),
.bail()
.isLength({max: 100}).withMessage(v_m['fa'].max_char.max100),
body('fa_page_title') body('fa_page_title')
.notEmpty().withMessage(v_m['fa'].required.title), .notEmpty().withMessage(v_m['fa'].required.title),
@@ -65,6 +82,7 @@ module.exports.createProduct = [
let cover = 'product_' + Date.now() + '.' + req.files.cover.mimetype.split('/')[1] let cover = 'product_' + Date.now() + '.' + req.files.cover.mimetype.split('/')[1]
let thumb = 'thumb_' + cover
let more_section_image1 = null let more_section_image1 = null
let more_section_image2 = null let more_section_image2 = null
let render_image1 = null let render_image1 = null
@@ -93,13 +111,15 @@ module.exports.createProduct = [
const data = { const data = {
cover: cover, cover: cover,
thumb: thumb,
category: req.body.category, category: req.body.category,
more_section: req.body.more_section, more_section: req.body.more_section,
download_section: req.body.download_section, download_section: req.body.download_section,
favorite: req.body.favorite,
product_details: { product_details: {
fa: { fa: {
name: req.body.fa_name, name: req.body.fa_name,
short_description: req.body.fa_short_description, short_description: req.body.fa_short_description.slice(0, shortDescriptionLength) + ' ... ',
page_title: req.body.fa_page_title, page_title: req.body.fa_page_title,
page_description: req.body.fa_page_description, page_description: req.body.fa_page_description,
more_title1: req.body.fa_more_title1, more_title1: req.body.fa_more_title1,
@@ -113,7 +133,7 @@ module.exports.createProduct = [
}, },
en: { en: {
name: req.body.en_name, name: req.body.en_name,
short_description: req.body.en_short_description, short_description: req.body.en_short_description.slice(0, shortDescriptionLength) + ' ... ',
page_title: req.body.en_page_title, page_title: req.body.en_page_title,
page_description: req.body.en_page_description, page_description: req.body.en_page_description,
more_title1: req.body.en_more_title1, more_title1: req.body.en_more_title1,
@@ -140,19 +160,22 @@ module.exports.createProduct = [
await jimp.read(req.files.cover.data) await jimp.read(req.files.cover.data)
.then(img => { .then(img => {
img img
.resize(470, jimp.AUTO) .cover(coverWidth, coverHeight)
.cover(470, 390) .quality(coverQuality)
.quality(70)
.write(`./static/uploads/images/products/${cover}`) .write(`./static/uploads/images/products/${cover}`)
.resize(thumbWidth, jimp.AUTO)
.cover(thumbWidth, thumbHeight)
.quality(thumbQuality)
.write(`./static/uploads/images/products/${thumb}`)
}) })
} }
if (req.files.more_section_image1) { if (req.files.more_section_image1) {
await jimp.read(req.files.more_section_image1.data) await jimp.read(req.files.more_section_image1.data)
.then(img => { .then(img => {
img img
.resize(778, jimp.AUTO) .resize(moreSectionWidth, jimp.AUTO)
.cover(778, 395) .cover(moreSectionWidth, moreSectionHeight)
.quality(70) .quality(moreSectionQuality)
.write(`./static/uploads/images/products/${more_section_image1}`) .write(`./static/uploads/images/products/${more_section_image1}`)
}) })
} }
@@ -160,9 +183,9 @@ module.exports.createProduct = [
await jimp.read(req.files.more_section_image2.data) await jimp.read(req.files.more_section_image2.data)
.then(img => { .then(img => {
img img
.resize(778, jimp.AUTO) .resize(moreSectionWidth, jimp.AUTO)
.cover(778, 395) .cover(moreSectionWidth, moreSectionHeight)
.quality(70) .quality(moreSectionQuality)
.write(`./static/uploads/images/products/${more_section_image2}`) .write(`./static/uploads/images/products/${more_section_image2}`)
}) })
} }
@@ -170,9 +193,9 @@ module.exports.createProduct = [
await jimp.read(req.files.render_image1.data) await jimp.read(req.files.render_image1.data)
.then(img => { .then(img => {
img img
.resize(300, jimp.AUTO) .resize(renderImageWidth, jimp.AUTO)
.cover(300, 300) .cover(renderImageWidth, renderImageHeight)
.quality(70) .quality(renderImageQuality)
.write(`./static/uploads/images/products/${render_image1}`) .write(`./static/uploads/images/products/${render_image1}`)
}) })
} }
@@ -180,9 +203,9 @@ module.exports.createProduct = [
await jimp.read(req.files.render_image2.data) await jimp.read(req.files.render_image2.data)
.then(img => { .then(img => {
img img
.resize(300, jimp.AUTO) .resize(renderImageWidth, jimp.AUTO)
.cover(300, 300) .cover(renderImageWidth, renderImageHeight)
.quality(70) .quality(renderImageQuality)
.write(`./static/uploads/images/products/${render_image2}`) .write(`./static/uploads/images/products/${render_image2}`)
}) })
} }
@@ -190,7 +213,7 @@ module.exports.createProduct = [
await jimp.read(req.files.chart_image.data) await jimp.read(req.files.chart_image.data)
.then(img => { .then(img => {
img img
.quality(100) .quality(chartImageQuality)
.write(`./static/uploads/images/products/${chart_image}`) .write(`./static/uploads/images/products/${chart_image}`)
}) })
} }
@@ -205,10 +228,10 @@ module.exports.createProduct = [
} }
] ]
module.exports.getAllProductsByCategory = [ module.exports.getFavoriteProducts = [
(req, res) => { (req, res) => {
Product.find({category: req.params.category}) Product.find({favorite: true})
.select('-product_features -product_images -created_at -updated_at') .select('thumb category product_details')
.exec((err, products) => { .exec((err, products) => {
if (err) console.log(err) if (err) console.log(err)
return res.json(products) return res.json(products)
@@ -218,7 +241,7 @@ module.exports.getAllProductsByCategory = [
module.exports.getAllProducts = [ module.exports.getAllProducts = [
(req, res) => { (req, res) => {
Product.find({}).select('cover category product_details').exec((err, products) => { Product.find({}).select('thumb category product_details favorite').exec((err, products) => {
if (err) console.log(err) if (err) console.log(err)
return res.json(products) return res.json(products)
}) })
@@ -259,14 +282,10 @@ module.exports.updateProduct = [
}), }),
body('fa_short_description') body('fa_short_description')
.notEmpty().withMessage(v_m['fa'].required.caption) .notEmpty().withMessage(v_m['fa'].required.caption),
.bail()
.isLength({max: 100}).withMessage(v_m['fa'].max_char.max100),
body('en_short_description') body('en_short_description')
.notEmpty().withMessage(v_m['fa'].required.caption) .notEmpty().withMessage(v_m['fa'].required.caption),
.bail()
.isLength({max: 100}).withMessage(v_m['fa'].max_char.max100),
body('fa_page_title') body('fa_page_title')
.notEmpty().withMessage(v_m['fa'].required.title), .notEmpty().withMessage(v_m['fa'].required.title),
@@ -301,6 +320,7 @@ module.exports.updateProduct = [
if (req.files) { if (req.files) {
if (req.files.cover) { if (req.files.cover) {
cover = 'product_' + Date.now() + '.' + req.files.cover.mimetype.split('/')[1] cover = 'product_' + Date.now() + '.' + req.files.cover.mimetype.split('/')[1]
thumb = 'thumb_' + cover
} }
if (req.files.more_section_image1) { if (req.files.more_section_image1) {
more_section_image1 = 'product_' + Date.now() + 1 + '.' + req.files.more_section_image1.mimetype.split('/')[1] more_section_image1 = 'product_' + Date.now() + 1 + '.' + req.files.more_section_image1.mimetype.split('/')[1]
@@ -324,10 +344,11 @@ module.exports.updateProduct = [
category: req.body.category, category: req.body.category,
more_section: req.body.more_section, more_section: req.body.more_section,
download_section: req.body.download_section, download_section: req.body.download_section,
favorite: req.body.favorite,
product_details: { product_details: {
fa: { fa: {
name: req.body.fa_name, name: req.body.fa_name,
short_description: req.body.fa_short_description, short_description: req.body.fa_short_description.slice(0, shortDescriptionLength) + ' ... ',
page_title: req.body.fa_page_title, page_title: req.body.fa_page_title,
page_description: req.body.fa_page_description, page_description: req.body.fa_page_description,
more_title1: req.body.fa_more_title1, more_title1: req.body.fa_more_title1,
@@ -341,7 +362,7 @@ module.exports.updateProduct = [
}, },
en: { en: {
name: req.body.en_name, name: req.body.en_name,
short_description: req.body.en_short_description, short_description: req.body.en_short_description.slice(0, shortDescriptionLength) + ' ... ',
page_title: req.body.en_page_title, page_title: req.body.en_page_title,
page_description: req.body.en_page_description, page_description: req.body.en_page_description,
more_title1: req.body.en_more_title1, more_title1: req.body.en_more_title1,
@@ -354,75 +375,81 @@ module.exports.updateProduct = [
chart_description: req.body.en_chart_description chart_description: req.body.en_chart_description
} }
}, },
created_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss') updated_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss')
}
if (req.files) {
if (req.files.cover) data.cover = cover
if (req.files.more_section_image1) data.more_section_image1 = more_section_image1
if (req.files.more_section_image2) data.more_section_image2 = more_section_image2
if (req.files.render_image1) data.render_image1 = render_image1
if (req.files.render_image2) data.render_image2 = render_image2
if (req.files.chart_image) data.chart_image = chart_image
} }
//// save images //// save images
if (req.files) { if (req.files) {
if (req.files.cover) { if (req.files.cover) {
data.cover = cover
data.thumb = thumb
await jimp.read(req.files.cover.data) await jimp.read(req.files.cover.data)
.then(img => { .then(img => {
img img
.resize(470, jimp.AUTO) .cover(coverWidth, coverHeight)
.cover(470, 390) .quality(coverQuality)
.quality(70)
.write(`./static/uploads/images/products/${cover}`) .write(`./static/uploads/images/products/${cover}`)
.resize(thumbWidth, jimp.AUTO)
.cover(thumbWidth, thumbHeight)
.quality(thumbQuality)
.write(`./static/uploads/images/products/${thumb}`)
}) })
} }
if (req.files.more_section_image1) { if (req.files.more_section_image1) {
data.more_section_image1 = more_section_image1
await jimp.read(req.files.more_section_image1.data) await jimp.read(req.files.more_section_image1.data)
.then(img => { .then(img => {
img img
.resize(778, jimp.AUTO) .resize(moreSectionWidth, jimp.AUTO)
.cover(778, 395) .cover(moreSectionWidth, moreSectionHeight)
.quality(70) .quality(moreSectionQuality)
.write(`./static/uploads/images/products/${more_section_image1}`) .write(`./static/uploads/images/products/${more_section_image1}`)
}) })
} }
if (req.files.more_section_image2) { if (req.files.more_section_image2) {
data.more_section_image2 = more_section_image2
await jimp.read(req.files.more_section_image2.data) await jimp.read(req.files.more_section_image2.data)
.then(img => { .then(img => {
img img
.resize(778, jimp.AUTO) .resize(moreSectionWidth, jimp.AUTO)
.cover(778, 395) .cover(moreSectionWidth, moreSectionHeight)
.quality(70) .quality(moreSectionQuality)
.write(`./static/uploads/images/products/${more_section_image2}`) .write(`./static/uploads/images/products/${more_section_image2}`)
}) })
} }
if (req.files.render_image1) { if (req.files.render_image1) {
data.render_image1 = render_image1
await jimp.read(req.files.render_image1.data) await jimp.read(req.files.render_image1.data)
.then(img => { .then(img => {
img img
.resize(300, jimp.AUTO) .resize(renderImageWidth, jimp.AUTO)
.cover(300, 300) .cover(renderImageWidth, renderImageHeight)
.quality(70) .quality(renderImageQuality)
.write(`./static/uploads/images/products/${render_image1}`) .write(`./static/uploads/images/products/${render_image1}`)
}) })
} }
if (req.files.render_image2) { if (req.files.render_image2) {
data.render_image2 = render_image2
await jimp.read(req.files.render_image2.data) await jimp.read(req.files.render_image2.data)
.then(img => { .then(img => {
img img
.resize(300, jimp.AUTO) .resize(renderImageWidth, jimp.AUTO)
.cover(300, 300) .cover(renderImageWidth, renderImageHeight)
.quality(70) .quality(renderImageQuality)
.write(`./static/uploads/images/products/${render_image2}`) .write(`./static/uploads/images/products/${render_image2}`)
}) })
} }
if (req.files.chart_image) { if (req.files.chart_image) {
data.chart_image = chart_image
await jimp.read(req.files.chart_image.data) await jimp.read(req.files.chart_image.data)
.then(img => { .then(img => {
img img
.quality(100) .quality(chartImageQuality)
.write(`./static/uploads/images/products/${chart_image}`) .write(`./static/uploads/images/products/${chart_image}`)
}) })
} }
@@ -432,9 +459,14 @@ module.exports.updateProduct = [
Product.findByIdAndUpdate(req.params.id, data, (err, oldData) => { Product.findByIdAndUpdate(req.params.id, data, (err, oldData) => {
if (err) console.log(err) if (err) console.log(err)
if (req.files) { if (req.files) {
if (req.files.cover) fs.unlink(`./static/${oldData.cover}`, err => { if (req.files.cover) {
fs.unlink(`./static/${oldData.cover}`, err => {
if (err) console.log(err) if (err) console.log(err)
}) })
fs.unlink(`./static/${oldData.thumb}`, err => {
if (err) console.log(err)
})
}
if (req.files.more_section_image1 && oldData.more_section_image1) fs.unlink(`./static/${oldData.more_section_image1}`, err => { if (req.files.more_section_image1 && oldData.more_section_image1) fs.unlink(`./static/${oldData.more_section_image1}`, err => {
if (err) console.log(err) if (err) console.log(err)
}) })
@@ -463,6 +495,48 @@ module.exports.deleteProduct = [
(req, res) => { (req, res) => {
Product.findByIdAndDelete(req.params.id, (err, product) => { Product.findByIdAndDelete(req.params.id, (err, product) => {
if (err) console.log(err) if (err) console.log(err)
fs.unlink(`./static/${product.cover}`, err => {
if (err) console.log(err)
})
fs.unlink(`./static/${product.thumb}`, err => {
if (err) console.log(err)
})
if (product.more_section_image1) fs.unlink(`./static/${product.more_section_image1}`, err => {
if (err) console.log(err)
})
if (product.more_section_image2) fs.unlink(`./static/${product.more_section_image2}`, err => {
if (err) console.log(err)
})
if (product.render_image1) fs.unlink(`./static/${product.render_image1}`, err => {
if (err) console.log(err)
})
if (product.render_image2) fs.unlink(`./static/${product.render_image2}`, err => {
if (err) console.log(err)
})
if (product.chart_image) fs.unlink(`./static/${product.chart_image}`, err => {
if (err) console.log(err)
})
if (product.images.length) {
product.images.forEach(item => {
fs.unlink(`./static/${item.image}`, err => {
if (err) console.log(err)
})
})
}
if (product.pdf_files.length) {
product.pdf_files.forEach(item => {
fs.unlink(`./static/${item.file.fa}`, err => {
if (err) console.log(err)
})
fs.unlink(`./static/${item.file.en}`, err => {
if (err) console.log(err)
})
})
}
return res.json({message: v_m['fa'].response.success_remove}) return res.json({message: v_m['fa'].response.success_remove})
}) })
} }
@@ -495,8 +569,8 @@ module.exports.createProductImage = [
jimp.read(image.data) jimp.read(image.data)
.then(img => { .then(img => {
img img
.resize(470, jimp.AUTO) .cover(coverWidth, coverHeight)
.cover(470, 390) .quality(coverQuality)
.write(`./static/uploads/images/products/${imageName}`) .write(`./static/uploads/images/products/${imageName}`)
//// write to database //// write to database
@@ -556,15 +630,26 @@ module.exports.createPDF = [
(req, res) => { (req, res) => {
const errors = validationResult(req) const errors = validationResult(req)
if (!errors.isEmpty()) return res.status(422).json({validation: errors.mapped()}) if (!errors.isEmpty()) return res.status(422).json({validation: errors.mapped()})
if (!req.files || !req.files.pdf) return res.status(422).json({validation: {pdf: {msg: v_m['fa'].required.file}}}) if (!req.files || !req.files.file_fa) return res.status(422).json({validation: {file_fa: {msg: v_m['fa'].required.file}}})
if (!req.files || !req.files.file_en) return res.status(422).json({validation: {file_en: {msg: v_m['fa'].required.file}}})
let file = 'pdf_' + Date.now() + '.' + req.files.pdf.mimetype.split('/')[1] Product.findById(req.body.product_id, (err, product) => {
req.files.pdf.mv(`./static/uploads/pdf/${file}`, err => { if (err) console.log(err)
let fileFa = 'fa_' + product.product_details.fa.name + Date.now() + '.' + req.files.file_fa.mimetype.split('/')[1]
let fileEn = 'en_' + product.product_details.en.name + Date.now() + '.' + req.files.file_en.mimetype.split('/')[1]
req.files.file_fa.mv(`./static/uploads/pdf/${fileFa}`, err => {
if (err) console.log(err)
})
req.files.file_en.mv(`./static/uploads/pdf/${fileEn}`, err => {
if (err) console.log(err) if (err) console.log(err)
}) })
const data = { const data = {
file: file, file: {
fa: fileFa,
en: fileEn
},
pdf_details: { pdf_details: {
fa: { fa: {
name: req.body.fa_pdf name: req.body.fa_pdf
@@ -576,8 +661,6 @@ module.exports.createPDF = [
created_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss') created_at: dateformat(Date.now(), 'yyyy-mm-dd HH:MM:ss')
} }
Product.findById(req.body.product_id, (err, product) => {
if (err) console.log(err)
product.pdf_files.push(data) product.pdf_files.push(data)
product.save() product.save()
return res.json(product) return res.json(product)
@@ -591,7 +674,10 @@ module.exports.deletePDF = [
if (err) return res.status(500).json({message: err}) if (err) return res.status(500).json({message: err})
let pdf = product.pdf_files.id(req.params.pdfID) let pdf = product.pdf_files.id(req.params.pdfID)
pdf.remove(cb => { pdf.remove(cb => {
fs.unlink(`./static/${pdf.file}`, err => { fs.unlink(`./static/${pdf.file.fa}`, err => {
if (err) console.log(err)
})
fs.unlink(`./static/${pdf.file.en}`, err => {
if (err) console.log(err) if (err) console.log(err)
}) })
}) })
+7 -3
View File
@@ -1,12 +1,16 @@
const mongoose = require('mongoose') const mongoose = require('mongoose')
function catalog(pdf) { function catalog(pdf) {
return '/uploads/pdf/' + pdf if (pdf) return '/uploads/pdf/' + pdf
} }
const MainCatalogSchema = mongoose.Schema({ const MainCatalogSchema = mongoose.Schema({
file: {type: String, get: catalog}, file: {
created_at: String fa: {type: String, get: catalog},
en: {type: String, get: catalog}
},
created_at: String,
updated_at: String
}, { }, {
toObject: {getters: true}, toObject: {getters: true},
toJSON: {getters: true} toJSON: {getters: true}
+8 -3
View File
@@ -1,11 +1,11 @@
const mongoose = require('mongoose') const mongoose = require('mongoose')
function productImage(img) { function productImage(img) {
return '/uploads/images/products/' + img if (img) return '/uploads/images/products/' + img
} }
function productPDF(file) { function productPDF(file) {
return '/uploads/pdf/' + file if (file) return '/uploads/pdf/' + file
} }
const ProductImageSchema = mongoose.Schema({ const ProductImageSchema = mongoose.Schema({
@@ -17,7 +17,10 @@ const ProductImageSchema = mongoose.Schema({
}) })
const ProductPDFSchema = mongoose.Schema({ const ProductPDFSchema = mongoose.Schema({
file: {type: String, get: productPDF}, file: {
fa: {type: String, get: productPDF},
en: {type: String, get: productPDF}
},
pdf_details: { pdf_details: {
fa: { fa: {
name: String name: String
@@ -34,6 +37,7 @@ const ProductPDFSchema = mongoose.Schema({
const ProductSchema = mongoose.Schema({ const ProductSchema = mongoose.Schema({
cover: {type: String, get: productImage}, cover: {type: String, get: productImage},
thumb: {type: String, get: productImage},
images: [ProductImageSchema], images: [ProductImageSchema],
more_section_image1: {type: String, get: productImage}, more_section_image1: {type: String, get: productImage},
more_section_image2: {type: String, get: productImage}, more_section_image2: {type: String, get: productImage},
@@ -44,6 +48,7 @@ const ProductSchema = mongoose.Schema({
category: String, category: String,
more_section: {type: Boolean, default: true}, more_section: {type: Boolean, default: true},
download_section: {type: Boolean, default: true}, download_section: {type: Boolean, default: true},
favorite: {type: Boolean, default: false},
product_details: { product_details: {
fa: { fa: {
name: String, name: String,
+7 -1
View File
@@ -12,6 +12,7 @@ const contactPageController = require('../controllers/contactPageController')
const contactUsReasonController = require('../controllers/contactUsReasonController') const contactUsReasonController = require('../controllers/contactUsReasonController')
const mainCatalogController = require('../controllers/mainCatalogController') const mainCatalogController = require('../controllers/mainCatalogController')
const historyController = require('../controllers/historyController') const historyController = require('../controllers/historyController')
const calculationModule = require('../controllers/calculationModule')
/////////////////////////////////////////////////////////// routes /////////////////////////////////////////////////////////// routes
//////////////// slider //////////////// slider
@@ -31,7 +32,7 @@ router.get('/productCategories', productCategoryController.getAll)
router.get('/productCategories/:id', productCategoryController.getOne) router.get('/productCategories/:id', productCategoryController.getOne)
//////////////// products //////////////// products
router.get('/products/:category', productController.getAllProductsByCategory) router.get('/favoriteProducts', productController.getFavoriteProducts)
router.get('/products/', productController.getAllProducts) router.get('/products/', productController.getAllProducts)
router.get('/product/:id', productController.getOneProduct) router.get('/product/:id', productController.getOneProduct)
@@ -51,4 +52,9 @@ router.get('/catalog', mainCatalogController.get)
router.get('/history', historyController.getAll) router.get('/history', historyController.getAll)
router.get('/history/:id', historyController.getOne) router.get('/history/:id', historyController.getOne)
//////////////// calculation
router.get('/calculation/values', calculationModule.getValues)
router.post('/calculation/relativeValues', calculationModule.getRelativeValues)
router.post('/calculate', calculationModule.calculate)
module.exports = router module.exports = router
+30 -7
View File
@@ -127,7 +127,7 @@ $panelBg: #fff;
padding: 0 15px; padding: 0 15px;
position: fixed; position: fixed;
top: 56px; top: 56px;
left: 15px; left: 0;
z-index: 5; z-index: 5;
h2 { h2 {
@@ -177,10 +177,11 @@ $panelBg: #fff;
} }
.admin--sidebar { .admin--sidebar {
min-height: calc(100vh - 55px); height: calc(100vh - 55px);
background: $sidebar; background: $sidebar;
flex-basis: 300px; flex-basis: 300px;
border-left: 1px solid $borders; border-left: 1px solid $borders;
overflow: auto;
ul { ul {
width: 100%; width: 100%;
@@ -231,6 +232,23 @@ $panelBg: #fff;
.admin-user { .admin-user {
padding: 20px 15px; padding: 20px 15px;
color: $usernameColor; color: $usernameColor;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
flex-wrap: nowrap;
.el-avatar {
display: block;
width: 50px;
height: 50px;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
h2 { h2 {
font-size: 25px !important; font-size: 25px !important;
@@ -254,6 +272,11 @@ $panelBg: #fff;
} }
} }
} }
.sidebar--content {
height: 100%;
overflow: auto;
}
} }
.admin--header { .admin--header {
@@ -320,6 +343,11 @@ $panelBg: #fff;
text-align: center; text-align: center;
} }
.err {
color: red;
font-size: 13px;
}
} }
pre { pre {
@@ -382,11 +410,6 @@ html:lang(fa) {
margin-top: 50px; margin-top: 50px;
} }
.err {
color: red;
font-size: 13px;
}
.el-upload__input { .el-upload__input {
display: none !important; display: none !important;
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 KiB

After

Width:  |  Height:  |  Size: 286 KiB

Before

Width:  |  Height:  |  Size: 640 KiB

After

Width:  |  Height:  |  Size: 640 KiB

+74
View File
@@ -0,0 +1,74 @@
.ck-content {
width: 100%;
direction: rtl;
text-align: right;
&:lang(en) {
direction: ltr;
text-align: left;
}
a {
display: inline-block;
color: blue;
}
p, a, span, b, ul, li, em, h1, h2, h3, h4, h5, h6, strong {
font-family: inherit, sans-serif;
direction: unset;
text-align: unset;
&:lang(en) {
font-family: inherit;
direction: unset;
text-align: unset;
}
&[dir="ltr"] {
direction: ltr;
text-align: left;
p, a, span, b, ul, li, em, h1, h2, h3, h4, h5, h6, strong {
direction: ltr;
text-align: left;
}
}
&[dir="rtl"] {
direction: rtl;
text-align: right;
p, a, span, b, ul, li, em, h1, h2, h3, h4, h5, h6, strong {
direction: rtl;
text-align: right;
}
}
}
p {
line-height: 1.6em;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1.3em;
}
li {
margin-bottom: 15px;
line-height: 1.6em;
}
ol {
list-style: decimal;
list-style-position: inside;
}
ul {
list-style: disc;
list-style-position: inside;
}
img {
max-width: 100%!important;
}
}
+16 -6
View File
@@ -6,12 +6,6 @@
url("../fonts/sahel/Sahel-FD.woff") format('woff'); url("../fonts/sahel/Sahel-FD.woff") format('woff');
} }
@font-face {
font-family: 'sahel-bold';
src: url("../fonts/sahel/Sahel-Bold-FD.eot") format('embedded-opentype'),
url("../fonts/sahel/Sahel-Bold-FD.ttf") format('truetype'),
url("../fonts/sahel/Sahel-Bold-FD.woff") format('woff');
}
@font-face { @font-face {
font-family: 'sahel-black'; font-family: 'sahel-black';
@@ -20,6 +14,22 @@
url("../fonts/sahel/Sahel-Black-FD.woff") format('woff'); url("../fonts/sahel/Sahel-Black-FD.woff") format('woff');
} }
////// sahel with latin
@font-face {
font-family: 'sahel-LD';
src: url("../fonts/sahelWithLatin/regular/Sahel.eot") format('embedded-opentype'),
url("../fonts/sahelWithLatin/regular/Sahel.ttf") format('truetype'),
url("../fonts/sahelWithLatin/regular/Sahel.woff") format('woff');
}
@font-face {
font-family: 'sahel-black-LD';
src: url("../fonts/sahelWithLatin/black/Sahel-Black.eot") format('embedded-opentype'),
url("../fonts/sahelWithLatin/black/Sahel-Black.ttf") format('truetype'),
url("../fonts/sahelWithLatin/black/Sahel-Black.woff") format('woff');
}
////// diodrum ////// diodrum
@font-face { @font-face {
font-family: 'diodrum'; font-family: 'diodrum';
+25 -2
View File
@@ -11,8 +11,8 @@ body {
} }
} }
p, a, span, b { p, a, span, b, label, strong, small, li {
font-family: 'sahel'; font-family: 'sahel', 'diodrum', sans-serif;
color: rgba(0, 0, 0, 0.7); color: rgba(0, 0, 0, 0.7);
line-height: 1.6em; line-height: 1.6em;
@@ -67,6 +67,24 @@ section {
padding: 0 0 100px; padding: 0 0 100px;
} }
.latin-digits {
p, a, span, b, label, strong, small, li, td, tr, th {
font-family: 'sahel-LD', 'diodrum', sans-serif;
&:lang(en) {
font-family: 'diodrum';
}
}
h1, h2, h3, h4, h5, h6 {
font-family: 'sahel-black-LD';
&:lang(en) {
font-family: 'diodrum-bold';
}
}
}
@keyframes loading { @keyframes loading {
0% { 0% {
@include transform(rotateZ(0)); @include transform(rotateZ(0));
@@ -168,6 +186,11 @@ section {
display: flex; display: flex;
align-items: stretch; align-items: stretch;
background: $darkGray; background: $darkGray;
direction: ltr;
&:lang(en) {
direction: rtl;
}
.catalog-download { .catalog-download {
display: block; display: block;
+238 -65
View File
@@ -341,7 +341,7 @@
.hero { .hero {
.bg { .bg {
background-image: url("../img/about/about-hero.jpg"); background-image: url("../img/services/hero.jpg");
} }
} }
@@ -557,7 +557,7 @@
.hero { .hero {
.bg { .bg {
background-image: url('../img/services/services-hero.jpg'); background-image: url('../img/services/hero.jpg');
} }
} }
@@ -639,7 +639,7 @@
.products--page { .products--page {
.hero { .hero {
.bg { .bg {
background-image: url('../img/products/products-hero.jpg'); background-image: url('../img/products/hero.jpg');
} }
} }
@@ -760,7 +760,6 @@
///////////////////////////// products page ///////////////////////////// products page
.product-details--page { .product-details--page {
.hero { .hero {
.bg { .bg {
background-image: url('../img/products/products-hero.jpg'); background-image: url('../img/products/products-hero.jpg');
@@ -782,16 +781,9 @@
} }
img { img {
width: 50%;
@media (max-width: 1200px) {
width: 80%;
}
@media (max-width: 992px) {
width: 100%; width: 100%;
} }
} }
}
.images-carousel { .images-carousel {
padding: 0 50px; padding: 0 50px;
@@ -818,20 +810,28 @@
} }
#images { #images {
margin-top: 250px; margin-top: 80px;
img { img {
width: 60%; width: 60%;
min-height: 100px;
object-fit: cover;
margin: 0 auto; margin: 0 auto;
cursor: pointer; cursor: pointer;
border: 3px solid transparent;
@extend %defaultTransition;
&.selected {
border: 3px solid $red;
}
} }
} }
} }
} }
.s2 { .s2 {
margin-top: 100px; margin-top: 200px;
.parts { .parts {
margin-top: 100px; margin-top: 100px;
@@ -877,6 +877,10 @@
&.p3 { &.p3 {
text-align: center; text-align: center;
img {
width: 100%;
}
} }
&.p4 { &.p4 {
@@ -1117,8 +1121,16 @@
text-align: right; text-align: right;
margin-bottom: 30px; margin-bottom: 30px;
span {
font-family: 'sahel', sans-serif;
}
&:lang(en) { &:lang(en) {
text-align: left; text-align: left;
span {
font-family: 'diodrum', sans-serif;
}
} }
.category { .category {
@@ -1178,6 +1190,14 @@
text-align: center; text-align: center;
margin-bottom: 80px; margin-bottom: 80px;
span {
font-family: 'sahel', sans-serif;
&:lang(en) {
font-family: 'diodrum', sans-serif;
}
}
.category { .category {
display: block; display: block;
margin-bottom: 10px; margin-bottom: 10px;
@@ -1212,52 +1232,6 @@
} }
} }
} }
.content {
direction: rtl;
text-align: right;
&:lang(en) {
direction: ltr;
text-align: left;
}
a {
color: blue;
}
p, a, span, b, ul, li, em, h1, h2, h3, h4, h5, h6, strong {
font-family: 'sahel', sans-serif;
direction: unset;
text-align: unset;
&:lang(en) {
font-family: 'diodrum';
direction: unset;
text-align: unset;
}
&[dir="ltr"] {
direction: ltr;
text-align: left;
p, a, span, b, ul, li, em, h1, h2, h3, h4, h5, h6, strong {
direction: ltr;
text-align: left;
}
}
&[dir="rtl"] {
direction: rtl;
text-align: right;
p, a, span, b, ul, li, em, h1, h2, h3, h4, h5, h6, strong {
direction: rtl;
text-align: right;
}
}
}
}
} }
.s2 { .s2 {
@@ -1290,6 +1264,17 @@
li { li {
margin-bottom: 30px; margin-bottom: 30px;
a {
@extend %defaultTransition;
&:hover {
color: $theme;
b {
color: $theme;
}
}
i { i {
color: $red; color: $red;
margin-left: 5px; margin-left: 5px;
@@ -1299,6 +1284,13 @@
margin-right: 5px; margin-right: 5px;
} }
} }
.phone-number {
display: inline-block;
direction: ltr !important;
text-align: left;
}
}
} }
} }
} }
@@ -1404,8 +1396,14 @@
list-style: decimal; list-style: decimal;
list-style-position: outside; list-style-position: outside;
p { a {
direction: ltr; direction: ltr;
color: $theme;
@extend %defaultTransition;
&:hover {
color: $red;
}
} }
} }
} }
@@ -1421,6 +1419,17 @@
} }
} }
&.gUsage {
img {
display: block;
margin-top: 50px;
margin-left: auto;
margin-right: auto;
width: 800px;
max-width: 100%;
}
}
h2 { h2 {
margin-top: 80px; margin-top: 80px;
margin-bottom: 30px; margin-bottom: 30px;
@@ -1482,29 +1491,48 @@
.s2 { .s2 {
.app { .app {
$appLayoutPadding: 55px;
@include transition(0.1s);
.appTitle { .appTitle {
text-align: center; text-align: center;
.title {
font-size: 30px;
@media (max-width: 1400px) {
font-size: 25px;
}
}
} }
.appMethod { .appMethod {
text-align: center; text-align: center;
margin-bottom: 50px; margin-bottom: 50px;
background: $red; background: $theme;
padding: 15px; padding: 15px;
.txt {
display: inline-block;
margin: 0 10px 10px;
}
span { span {
color: #fff; color: #fff;
} }
.el-radio-button__orig-radio:checked + .el-radio-button__inner { .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: $darkGray; background-color: $darkGray;
border-color: $darkGray; border-color: #fff;
@include boxShadow(-1px 0 0 0 $darkGray); @include boxShadow(-1px 0 0 0 $darkGray);
} }
.el-radio-button .el-radio-button__inner { .el-radio-button .el-radio-button__inner {
color: $red; color: $theme;
@extend %userSelect;
@media (max-width: 530px) {
font-size: 12px;
}
} }
.el-radio-button.is-active .el-radio-button__inner { .el-radio-button.is-active .el-radio-button__inner {
@@ -1513,8 +1541,8 @@
} }
.appLayout { .appLayout {
padding: 55px; padding: $appLayoutPadding;
background: $red; background: $theme;
height: 100%; height: 100%;
@include boxSizing(border-box); @include boxSizing(border-box);
@@ -1608,6 +1636,10 @@
color: $darkGray; color: $darkGray;
} }
} }
.err {
color: $red;
}
} }
.el-input { .el-input {
@@ -1616,6 +1648,35 @@
//@media (max-width: 600px) { //@media (max-width: 600px) {
// width: 100%; // width: 100%;
//} //}
input {
font-family: 'sahel', 'diodrum', sans-serif;
&:lang(en) {
font-family: 'diodrum', sans-serif;
}
&::placeholder {
font-family: 'sahel';
&:lang(en) {
font-family: 'diodrum';
}
}
}
.el-input__suffix {
right: auto;
left: 5px;
&:lang(en) {
right: 5px;
left: auto;
}
.el-input__icon {
color: #000;
}
}
} }
.el-select { .el-select {
@@ -1630,6 +1691,118 @@
margin-left: 20px; margin-left: 20px;
} }
} }
.appResult {
background: lightgray;
padding-left: $appLayoutPadding;
padding-right: $appLayoutPadding;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
opacity: 0;
height: 0;
overflow: hidden;
.success {
color: #67C23A;
}
.failure {
color: $red;
}
@keyframes waiting {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
p {
font-size: 20px;
font-weight: bold;
}
.waiting {
@include animation(waiting 0.7s alternate-reverse infinite);
}
}
}
}
.s3 {
.notice {
color: red;
font-size: 14px;
display: none;
@media (max-width: 992px) {
display: block;
}
}
.tableBox {
width: 100%;
overflow: auto;
table {
width: 100%;
min-width: 960px;
border: 1px solid rgba(#000, 1);
thead {
background: $theme;
color: #fff;
th {
padding: 20px;
font-family: 'sahel-LD', 'diodrum', sans-serif;
direction: ltr;
&.middle {
border-left: 2px solid rgba(#fff, 0.4) !important;
border-right: 2px solid rgba(#fff, 0.4) !important;
}
}
}
tbody {
background: rgba($theme, 0.2);
color: #000;
tr {
line-height: 1.3em;
td {
border: 1px solid rgba(#000, 1);
padding: 20px;
font-family: 'sahel-LD', 'diodrum', sans-serif;
direction: ltr;
text-align: center;
&:last-child {
direction: ltr !important;
}
}
&.odd {
background: rgba(#000, 0.1);
}
}
}
}
&.vehicles {
}
&.forklifts {
margin-top: 50px;
}
} }
} }
} }
+1
View File
@@ -1,3 +1,4 @@
@import "CKEditorStyle";
@import "variables"; @import "variables";
@import "mixins"; @import "mixins";
@import "extentions"; @import "extentions";
+8 -13
View File
@@ -5,35 +5,30 @@
<div class="col-12 col-md-8 mb-3 mb-md-0 links"> <div class="col-12 col-md-8 mb-3 mb-md-0 links">
<logo/> <logo/>
<div class="box"> <div class="box">
<p><b>{{staticData.t1}}</b> <span>{{staticData.address}}</span></p> <p><b>{{ staticData.t1 }}</b> <span>{{ $store.state.global.address[$route.params.lang] }}</span></p>
<!-- <hr>--> <!-- <hr>-->
<p class="red"> <p class="red">
<b>{{staticData.t2}}</b> <a :href="'tel:' + staticData.fax">{{staticData.tell}}</a> <b>{{ staticData.t2 }}</b> <a :href="'tel:' + $store.state.global.tell">{{ $store.state.global.tell_view }}</a>
&nbsp &nbsp - &nbsp &nbsp &nbsp &nbsp - &nbsp &nbsp
<b>{{staticData.t3}}</b> <a :href="'tel:' + staticData.fax">{{staticData.fax}}</a> <b>{{ staticData.t3 }}</b> <a :href="'tel:' + $store.state.global.fax">{{ $store.state.global.fax_view }}</a>
</p> </p>
</div> </div>
</div> </div>
<div class="col-12 col-md-4 social"> <div class="col-12 col-md-4 social">
<ul class="social-links"> <ul class="social-links">
<li> <li>
<a href="" target="_blank"> <a :href="$store.state.global.instagram_url" target="_blank">
<em class="fab fa-facebook-f"></em> <i class="fab fa-instagram"></i>
</a> </a>
</li> </li>
<li> <li>
<a href="" target="_blank"> <a :href="$store.state.global.linkedin_url" target="_blank">
<em class="fab fa-twitter"></em> <i class="fab fa-linkedin-in"></i>
</a>
</li>
<li>
<a href="" target="_blank">
<em class="fab fa-telegram-plane"></em>
</a> </a>
</li> </li>
</ul> </ul>
<p>{{ staticData.t5 }}</p> <p>{{ staticData.t5 }}</p>
<p class="blue"><b>{{staticData.t4}}</b> <a :href="'mailto:' + staticData.email">{{staticData.email}}</a></p> <p class="blue"><b>{{ staticData.t4 }}</b> <a :href="'mailto:' + $store.state.global.email">{{ $store.state.global.email }}</a></p>
</div> </div>
</div> </div>
</div> </div>
+8 -13
View File
@@ -8,28 +8,23 @@
<span>{{ staticData.t6 }}</span> <span>{{ staticData.t6 }}</span>
</div> </div>
<div class="box"> <div class="box">
<p><b>{{staticData.t1}}</b> <span>{{staticData.address}}</span></p> <p><b>{{ staticData.t1 }}</b> <span>{{ $store.state.global.address[$route.params.lang] }}</span></p>
<hr> <hr>
<p class="red"><b>{{staticData.t2}}</b> <a :href="'tel:' + staticData.fax">{{staticData.tell}}</a></p> <p class="red"><b>{{ staticData.t2 }}</b> <a :href="'tel:' + $store.state.global.tell">{{ $store.state.global.tell_view }}</a></p>
<p class="red"><b>{{staticData.t3}}</b> <a :href="'tel:' + staticData.fax">{{staticData.fax}}</a></p> <p class="red"><b>{{ staticData.t3 }}</b> <a :href="'tel:' + $store.state.global.fax">{{ $store.state.global.fax_view }}</a></p>
<ul class="social-links red"> <ul class="social-links red">
<li> <li>
<a href="" target="_blank"> <a :href="$store.state.global.instagram_url" target="_blank">
<em class="fab fa-facebook-f"></em> <i class="fab fa-instagram"></i>
</a> </a>
</li> </li>
<li> <li>
<a href="" target="_blank"> <a :href="$store.state.global.linkedin_url" target="_blank">
<em class="fab fa-twitter"></em> <i class="fab fa-linkedin-in"></i>
</a>
</li>
<li>
<a href="" target="_blank">
<em class="fab fa-telegram-plane"></em>
</a> </a>
</li> </li>
</ul> </ul>
<p class="blue"><b>{{staticData.t4}}</b> <a :href="'mailto:' + staticData.email">{{staticData.email}}</a></p> <p class="blue"><b>{{ staticData.t4 }}</b> <a :href="'mailto:' + $store.state.global.email">{{ $store.state.global.email }}</a></p>
</div> </div>
</div> </div>
<div class="xol-12 col-md-4 map"> <div class="xol-12 col-md-4 map">
+1 -1
View File
@@ -1,7 +1,7 @@
<template> <template>
<header class="header"> <header class="header">
<div class="lang-bar"> <div class="lang-bar">
<a :href="catalog.file" target="_blank" class="catalog-download"> <a v-if="catalog && catalog.file" :href="catalog.file[$route.params.lang]" target="_blank" class="catalog-download">
<span>{{ staticData.catalog }}</span> <span>{{ staticData.catalog }}</span>
<span>&nbsp;</span> <span>&nbsp;</span>
<i class="fas fa-download"></i> <i class="fas fa-download"></i>
+2
View File
@@ -6,8 +6,10 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<aside class="admin--sidebar"> <aside class="admin--sidebar">
<div class="sidebar--content">
<admin-user v-if="$auth.loggedIn && $auth.user.scope.includes('admin')" :user="$auth.user.name"/> <admin-user v-if="$auth.loggedIn && $auth.user.scope.includes('admin')" :user="$auth.user.name"/>
<admin-aside/> <admin-aside/>
</div>
</aside> </aside>
<div class="admin--content"> <div class="admin--content">
<nuxt/> <nuxt/>
+7
View File
@@ -36,7 +36,14 @@
return { return {
htmlAttrs: { htmlAttrs: {
lang: this.$route.params.lang lang: this.$route.params.lang
},
meta: [
{
hid: 'description',
name: 'description',
content: this.$store.state.global.meta_description[this.$route.params.lang]
} }
],
} }
} }
} }
+7 -4
View File
@@ -2,11 +2,10 @@ const webpack = require("webpack")
export default { export default {
// Global page headers (https://go.nuxtjs.dev/config-head) // Global page headers (https://go.nuxtjs.dev/config-head)
head: { head: {
title: 'Arak Rail', title: 'اراک ریل',
meta: [ meta: [
{charset: 'utf-8'}, {charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'}, {name: 'viewport', content: 'width=device-width, initial-scale=1'},
{hid: 'description', name: 'description', content: ''},
{name: 'theme-color', content: '#303030'}, {name: 'theme-color', content: '#303030'},
], ],
link: [ link: [
@@ -60,8 +59,12 @@ export default {
// Build Configuration (https://go.nuxtjs.dev/config-build) // Build Configuration (https://go.nuxtjs.dev/config-build)
build: { build: {
transpile: [/^element-ui/], transpile: [/^element-ui/],
vendor: ["jquery"],
plugins: [new webpack.ProvidePlugin({$: "jquery"})] plugins: [new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
})]
}, },
router: { router: {
middleware: ['redirects'], middleware: ['redirects'],
+1 -1
View File
@@ -96,7 +96,7 @@
</div> </div>
<div class="col-12 col-lg-7 txt"> <div class="col-12 col-lg-7 txt">
<p>{{ item.title }}</p> <p>{{ item.title }}</p>
<a :href="item.link.url" class="btn btn-primary" target="_blank">{{item.link.txt}}</a> <a :href="`/standards_pdf/${item.link.url}`" download class="btn btn-primary" target="_blank">{{ item.link.txt }}</a>
</div> </div>
</div> </div>
</div> </div>
+2 -2
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page blog-details--page"> <div class="page blog-details--page latin-digits">
<Hero :title="categoryName(post.category)"/> <Hero :title="categoryName(post.category)"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
@@ -11,7 +11,7 @@
</span> </span>
<span class="date">{{ jDate(post.created_at) }}</span> <span class="date">{{ jDate(post.created_at) }}</span>
</div> </div>
<div class="content" v-html="post.post_details[$route.params.lang].description"></div> <div class="ck-content" v-html="post.post_details[$route.params.lang].description"></div>
<div class="share"> <div class="share">
<p>{{ staticData.t2 }}</p> <p>{{ staticData.t2 }}</p>
<ul> <ul>
+2 -2
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page blog--page"> <div class="page blog--page latin-digits">
<Hero :title="staticData.hero"/> <Hero :title="staticData.hero"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
@@ -33,7 +33,7 @@
<div class="container"> <div class="container">
<div class="row posts-container" v-if="filtered_posts.length"> <div class="row posts-container" v-if="filtered_posts.length">
<div class="col-12 col-sm-6 col-lg-12 clearfix post anim-fadeIn" v-for="item in filtered_posts" :key="item._id"> <div class="col-12 col-md-6 col-lg-12 clearfix post anim-fadeIn" v-for="item in filtered_posts" :key="item._id">
<div class="panel"> <div class="panel">
<div class="imgBox imgBox-reverse"> <div class="imgBox imgBox-reverse">
<div class="img"> <div class="img">
+319 -74
View File
@@ -1,11 +1,11 @@
<template> <template>
<div class="page calculation--page"> <div class="page calculation--page latin-digits">
<Hero title="نرم افزار محاسبه"/> <Hero :title="staticData.hero"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
<div class="panel"> <div class="panel">
<h2 class="title">وزن گریتینگ</h2> <h2 class="title">{{ staticData.app.t1 }}</h2>
<p>بدلیل این که وزن گریتینگ ها به واسطه مواردی همچون مشخصات فنی یا همان دیتیل ساخت از جمله نوع گریتینگ،جنس تسمه و اندازه چشمه ها متغیر است،بدین منظور جهت راحتی و سهولت در انجام کار شما مشتری گرامی، شرکت اراک ریل نرم افزار محاسبه وزن و میزان بار قابل تحمل را برای گریتینگ طراحی و در این صفحه قرار داده است.که با داشتن مشخصات فنی گریتینگ مورد نظر خود میتوانید وزن گریتینگ خود را همراه با گالوانیزه و یا بدون گالوانیزه محاسبه کنید.</p> <p>{{ staticData.app.t2 }}</p>
</div> </div>
</div> </div>
</section> </section>
@@ -14,145 +14,171 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="app m-auto" :class="app.method === 'a' ? 'col-12 col-lg-6' : 'col-12'"> <div class="app m-auto" :class="app.method === 'custom' ? 'col-12 col-lg-9 col-xl-8 col-xxl-6' : 'col-12'">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="appTitle"> <div class="appTitle">
<h2 class="title">ظرفیت بارگیری گریتینگ خود را محاسبه کنید</h2> <h2 class="title">{{ staticData.app.t3 }}</h2>
</div> </div>
<div class="appMethod"> <div class="appMethod">
<span>روش محاسبه</span> <span class="txt">{{ staticData.app.t4 }}</span>
<el-radio-group v-model="app.method" style="direction: ltr"> <el-radio-group v-model="app.method" style="direction: ltr">
<el-radio-button label="b">نفر یا وسیله نقلیه</el-radio-button> <template v-if="$route.params.lang === 'fa'">
<el-radio-button label="a">وارد کردن بار</el-radio-button> <el-radio-button label="classified">{{ staticData.app.t5 }}</el-radio-button>
<el-radio-button label="custom">{{ staticData.app.t6 }}</el-radio-button>
</template>
<template v-else>
<el-radio-button label="custom">{{ staticData.app.t6 }}</el-radio-button>
<el-radio-button label="classified">{{ staticData.app.t5 }}</el-radio-button>
</template>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<div class="col-12 col-lg-6 mb-5 mb-lg-0" v-if="app.method === 'b'"> <div class="col-12 col-lg-6 mb-5 mb-lg-0" v-if="app.method === 'classified'">
<div class="appLayout"> <div class="appLayout">
<h2 class="layoutTitle">انتخاب کلاس لودینگ</h2> <h2 class="layoutTitle">{{ staticData.app.t7 }}</h2>
<div class="class"> <div class="class">
<h4>عابر پیاده:</h4> <h4>{{ staticData.app.t8 }}</h4>
<el-radio v-model="app.class" :label="1">کلاس 1</el-radio> <el-radio v-model="app.vehicleClass" label="class1">{{ staticData.app.t9 }}</el-radio>
</div> </div>
<div class="class"> <div class="class">
<h4>وسایل نقلیه:</h4> <h4>{{ staticData.app.t10 }}</h4>
<el-radio v-model="app.class" :label="2">کلاس 2</el-radio> <el-radio v-model="app.vehicleClass" label="class2">{{ staticData.app.t11 }}</el-radio>
<el-radio v-model="app.class" :label="3">کلاس 3</el-radio> <el-radio v-model="app.vehicleClass" label="class3">{{ staticData.app.t12 }}</el-radio>
<el-radio v-model="app.class" :label="4">کلاس 4</el-radio> <el-radio v-model="app.vehicleClass" label="class4">{{ staticData.app.t13 }}</el-radio>
</div> </div>
<div class="class"> <div class="class">
<h4>لیفتراک:</h4> <h4>{{ staticData.app.t14 }}</h4>
<el-radio v-model="app.class" :label="5">FL1</el-radio> <el-radio v-model="app.vehicleClass" label="FL1">FL1</el-radio>
<el-radio v-model="app.class" :label="6">FL2</el-radio> <el-radio v-model="app.vehicleClass" label="FL2">FL2</el-radio>
<el-radio v-model="app.class" :label="7">FL3</el-radio> <el-radio v-model="app.vehicleClass" label="FL3">FL3</el-radio>
<el-radio v-model="app.class" :label="8">FL4</el-radio> <el-radio v-model="app.vehicleClass" label="FL4">FL4</el-radio>
<el-radio v-model="app.class" :label="9">FL5</el-radio> <el-radio v-model="app.vehicleClass" label="FL5">FL5</el-radio>
<el-radio v-model="app.class" :label="10">FL6</el-radio> <el-radio v-model="app.vehicleClass" label="FL6">FL6</el-radio>
</div> </div>
</div> </div>
</div> </div>
<div :class="app.method === 'a' ? 'col-12' : 'col-12 col-lg-6'"> <div :class="app.method === 'custom' ? 'col-12' : 'col-12 col-lg-6'">
<div class="appLayout"> <div class="appLayout">
<h2 class="layoutTitle">اطلاعات ورودی</h2> <h2 class="layoutTitle">{{ staticData.app.t15 }}</h2>
<el-form key="form-a"> <el-form key="form-a">
<el-form-item label="نوع گریتینگ"> <el-form-item :label="staticData.app.t16">
<el-radio-group v-model="app.type"> <el-radio-group v-model="app.gratingType">
<el-radio label="elec">الکتروفورج</el-radio> <el-radio label="forge">{{ staticData.app.t17 }}</el-radio>
<el-radio label="press">پرسی</el-radio> <el-radio label="pressured">{{ staticData.app.t18 }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="بار متمرکز (kn)"> <el-form-item :label="staticData.app.t19" v-if="app.method === 'custom'">
<el-input v-model="app.pointLoad" placeholder="وارد کنید"></el-input> <el-radio-group v-model="app.loadType">
<!-- <span>kn</span>--> <el-radio label="pointedLoad">{{ staticData.app.t20 }}</el-radio>
<el-radio label="distributedLoad">{{ staticData.app.t21 }}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="بار گسترده (kn/m2)"> <el-form-item :class="validation.pointedLoadValue ? 'is-error' : null" :label="staticData.app.t22" v-if="app.method === 'custom' && app.loadType === 'pointedLoad'">
<el-input v-model="app.distributedLoad" placeholder="وارد کنید"></el-input> <el-input v-model="app.pointedLoadValue" :placeholder="staticData.app.enter"></el-input>
<!-- <span>kn/m2</span>--> <p class="err" v-if="validation.pointedLoadValue">{{ validation.pointedLoadValue.msg }}</p>
</el-form-item> </el-form-item>
<el-form-item label="گام تسمه های باربر (mm)"> <el-form-item :class="validation.distributedLoadValue ? 'is-error' : null" :label="staticData.app.t23" v-if="app.method === 'custom' && app.loadType === 'distributedLoad'">
<el-input v-model="app.distributedLoadValue" :placeholder="staticData.app.enter"></el-input>
<p class="err" v-if="validation.distributedLoadValue">{{ validation.distributedLoadValue.msg }}</p>
</el-form-item>
<el-select v-model="app.bearingBarPitch" key="bearingBarPitch_elec" v-if="app.type === 'elec'" placeholder="انتخاب کنید"> <el-form-item :class="validation.bearingBarPitch ? 'is-error' : null" :label="staticData.app.t24">
<el-select v-model="app.bearingBarPitch" key="bearingBarPitch_forge" v-if="app.gratingType === 'forge'"
:placeholder="staticData.app.select">
<el-option <el-option
v-for="item in bearingBarPitch_elec" v-for="item in calculationValues.bearingBarPitch_forge"
:key="item" :key="item"
:label="item" :label="item"
:value="item"> :value="item">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="app.bearingBarPitch" key="bearingBarPitch_press" v-if="app.type === 'press'" placeholder="انتخاب کنید"> <el-select v-model="app.bearingBarPitch" key="bearingBarPitch_pressured" v-if="app.gratingType === 'pressured'" :placeholder="staticData.app.select">
<el-option <el-option
v-for="item in bearingBarPitch_press" v-for="item in calculationValues.bearingBarPitch_pressured"
:key="item" :key="item"
:label="item" :label="item"
:value="item"> :value="item">
</el-option> </el-option>
</el-select> </el-select>
<!-- <span>mm</span>--> <p class="err" v-if="validation.bearingBarPitch">{{ validation.bearingBarPitch.msg }}</p>
</el-form-item> </el-form-item>
<el-form-item label="گام تسمه های رابط (mm)">
<el-select v-model="app.crossBarPitCh" key="bearingBarPitch_elec" v-if="app.type === 'elec'" placeholder="انتخاب کنید"> <el-form-item :class="validation.crossBarPitch ? 'is-error' : null" :label="staticData.app.t25">
<el-select v-model="app.crossBarPitch" key="crossBarPitch_forge" v-if="app.gratingType === 'forge'" :placeholder="staticData.app.select">
<el-option <el-option
v-for="item in crossBarPitCh_elec" v-for="item in calculationValues.crossBarPitch_forge"
:key="item" :key="item"
:label="item" :label="item"
:value="item"> :value="item">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="app.crossBarPitCh" key="bearingBarPitch_press" v-if="app.type === 'press'" placeholder="انتخاب کنید"> <el-select v-model="app.crossBarPitch" key="crossBarPitch_pressured" v-if="app.gratingType === 'pressured'" :placeholder="staticData.app.select">
<el-option <el-option
v-for="item in crossBarPitCh_press" v-for="item in calculationValues.crossBarPitch_pressured"
:key="item" :key="item"
:label="item" :label="item"
:value="item"> :value="item">
</el-option> </el-option>
</el-select> </el-select>
<!-- <span>mm</span>--> <p class="err" v-if="validation.crossBarPitch">{{ validation.crossBarPitch.msg }}</p>
</el-form-item> </el-form-item>
<el-form-item label="دهنه باربر (mm)">
<el-input v-model="app.clearSpan" placeholder="وارد کنید"></el-input> <el-form-item :class="validation.clearSpan ? 'is-error' : null" :label="staticData.app.t26">
<!-- <span>mm</span>--> <el-input v-model="app.clearSpan" :placeholder="staticData.app.enter"></el-input>
<p class="err" v-if="validation.clearSpan">{{ validation.clearSpan.msg }}</p>
</el-form-item> </el-form-item>
<el-form-item label="ضخامت تسمه های باربر (mm)"> <el-form-item :class="validation.bearingBarThickness ? 'is-error' : null" :label="staticData.app.t27">
<el-input v-model="app.bearingBarThickness" placeholder="وارد کنید"></el-input> <el-input v-model="app.bearingBarThickness" :placeholder="staticData.app.enter"></el-input>
<!-- <span>mm</span>--> <p class="err" v-if="validation.bearingBarThickness">{{ validation.bearingBarThickness.msg }}</p>
</el-form-item> </el-form-item>
<el-form-item label="ارتفاع تسمه های باربر (mm)"> <el-form-item :class="validation.bearingBarHeight ? 'is-error' : null" :label="staticData.app.t28">
<el-select v-model="app.bearingBarHeight" key="bearingBarHeight" placeholder="انتخاب کنید"> <el-select v-model="app.bearingBarHeight"
key="bearingBarHeight"
:placeholder="relativeValues || app.loadType === 'distributedLoad' ? staticData.app.select : staticData.app.t29">
<el-option <el-option
v-for="item in bearingBarHeight" v-for="item in app.loadType === 'distributedLoad' ? calculationValues.bearingBarHeight : relativeValues"
:key="item" :key="item"
:label="item" :label="item"
:value="item"> :value="item">
</el-option> </el-option>
</el-select> </el-select>
<!-- <span>mm</span>--> <p class="err" v-if="validation.bearingBarHeight">{{ validation.bearingBarHeight.msg }}</p>
</el-form-item> </el-form-item>
<div class="calculateBtn"> <div class="calculateBtn">
<!-- <el-button>محاسبه</el-button>--> <button class="btn btn-reverse-fill" @click.prevent="calculate">{{ staticData.app.calculate }}</button>
<button class="btn btn-reverse-fill">محاسبه</button>
</div> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="col-12 mt-5">
<div class="appResult" v-if="waiting || appResult || validation">
<p class="waiting" v-if="waiting">{{ staticData.app.waiting }}</p>
<p class="err" v-if="!appResult">{{ staticData.app.validationErr }}</p>
<p v-if="appResult" :class="appResult.sigmaStatus ? 'success' : 'failure'">{{ appResult.sigma }}</p>
<p v-if="appResult" :class="appResult.deflectionStatus ? 'success' : 'failure'">{{ appResult.deflection }}</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -160,51 +186,270 @@
</div> </div>
</div> </div>
</section> </section>
<section class="s3">
<div class="container">
<div class="row">
<div class="col-12">
<div class="tableBox vehicles">
<table>
<thead>
<tr>
<th colspan="4" class="center">{{ staticData.table1.title }}</th>
<th class="middle">{{ staticData.table1.load }}</th>
<th>{{ staticData.table1.imprint }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ staticData.table1.class1.t1 }}</td>
<td>{{ staticData.table1.class1.t2 }}</td>
<td>{{ staticData.table1.class1.t3 }}</td>
<td>{{ staticData.table1.danSqm }}</td>
<td>600</td>
<td>1000 x 1000</td>
</tr>
<tr class="odd">
<td>{{ staticData.table1.class2.t1 }}</td>
<td>{{ staticData.table1.class2.t2 }}</td>
<td>{{ staticData.table1.class2.t3 }}</td>
<td>{{ staticData.table1.danImprint }}</td>
<td>1.000</td>
<td>200 x 200</td>
</tr>
<tr>
<td>{{ staticData.table1.class3.t1 }}</td>
<td>{{ staticData.table1.class3.t2 }}</td>
<td>{{ staticData.table1.class3.t3 }}</td>
<td>{{ staticData.table1.danImprint }}</td>
<td>3.000</td>
<td>200 x 400</td>
</tr>
<tr class="odd">
<td>{{ staticData.table1.class4.t1 }}</td>
<td>{{ staticData.table1.class4.t2 }}</td>
<td>{{ staticData.table1.class4.t3 }}</td>
<td>{{ staticData.table1.danImprint }}</td>
<td>9.000</td>
<td>250 x 600</td>
</tr>
</tbody>
</table>
</div>
<p class="notice">{{ staticData.scrollToSee }}</p>
<div class="tableBox forklifts">
<table>
<thead>
<tr>
<th colspan="6" class="center">{{ staticData.table2.title }}</th>
<th class="middle">{{ staticData.table2.load }}</th>
<th>{{ staticData.table2.imprint }}</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>{{ staticData.table2.t1 }}</td>
<td>{{ staticData.table2.t2 }}</td>
<td>{{ staticData.table2.t3 }}</td>
<td>{{ staticData.table2.t4 }}</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>{{ staticData.table2.fl1.t1 }}</td>
<td>{{ staticData.table2.fl1.t2 }}</td>
<td>21</td>
<td>10</td>
<td>31</td>
<td>{{ staticData.table2.danImprint }}</td>
<td>2600</td>
<td>130 x 130</td>
</tr>
<tr>
<td>{{ staticData.table2.fl2.t1 }}</td>
<td>{{ staticData.table2.fl2.t2 }}</td>
<td>31</td>
<td>15</td>
<td>46</td>
<td>{{ staticData.table2.danImprint }}</td>
<td>4000</td>
<td>175 x 150</td>
</tr>
<tr class="odd">
<td>{{ staticData.table2.fl3.t1 }}</td>
<td>{{ staticData.table2.fl3.t2 }}</td>
<td>44</td>
<td>25</td>
<td>69</td>
<td>{{ staticData.table2.danImprint }}</td>
<td>6300</td>
<td>200 x 200</td>
</tr>
<tr>
<td>{{ staticData.table2.fl4.t1 }}</td>
<td>{{ staticData.table2.fl4.t2 }}</td>
<td>60</td>
<td>40</td>
<td>100</td>
<td>{{ staticData.table2.danImprint }}</td>
<td>9000</td>
<td>300 x 200</td>
</tr>
<tr class="odd">
<td>{{ staticData.table2.fl5.t1 }}</td>
<td>{{ staticData.table2.fl5.t2 }}</td>
<td>90</td>
<td>60</td>
<td>150</td>
<td>{{ staticData.table2.danImprint }}</td>
<td>14000</td>
<td>375 x 200</td>
</tr>
<tr>
<td>{{ staticData.table2.fl6.t1 }}</td>
<td>{{ staticData.table2.fl6.t2 }}</td>
<td>110</td>
<td>80</td>
<td>190</td>
<td>{{ staticData.table2.danImprint }}</td>
<td>17000</td>
<td>450 x 200</td>
</tr>
</tbody>
</table>
</div>
<p class="notice">{{ staticData.scrollToSee }}</p>
</div>
</div>
</div>
</section>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment-jalaali'
import {fadeInAnimation} from '~/mixins/animations' import {fadeInAnimation} from '~/mixins/animations'
export default { export default {
data() { data() {
return { return {
history: null,
app: { app: {
method: 'a', method: 'custom',
type: 'elec', gratingType: 'forge',
class: '', loadType: 'pointedLoad',
pointLoad: '', vehicleClass: 'class1',
distributedLoad: '', pointedLoadValue: '',
distributedLoadValue: '',
bearingBarPitch: '', bearingBarPitch: '',
crossBarPitCh: '', crossBarPitch: '',
clearSpan: '', clearSpan: '',
bearingBarThickness: '', bearingBarThickness: '',
bearingBarHeight: '', bearingBarHeight: '',
locale: this.$route.params.lang locale: this.$route.params.lang
}, },
bearingBarPitch_elec: [30, 35, 41, 50], calculationValues: null,
bearingBarPitch_press: [11, 22, 33, 44, 50, 55], relativeValues: null,
crossBarPitCh_elec: [50, 76, 100], validation: {},
crossBarPitCh_press: [11, 22, 33, 44, 50, 55, 66, 77, 88, 100], waiting: false,
bearingBarHeight: [20, 25, 30, 35, 40, 45, 50, 55, 60] appResult: null
} }
}, },
computed: { computed: {
staticData() { staticData() {
return this.$store.state.staticData.calculation[this.$route.params.lang] return this.$store.state.staticData.calculation[this.$route.params.lang]
},
gratingTypeTrigger() {
return this.app.gratingType
},
crossBarPitchTrigger() {
return this.app.crossBarPitch
},
loadTypeTrigger() {
return this.app.loadType
},
vehicleClassTrigger() {
return this.app.vehicleClass
},
methodTrigger() {
return this.app.method
}
},
watch: {
loadTypeTrigger(newVal, oldVal) {
this.app.bearingBarHeight = ''
},
gratingTypeTrigger(newVal, oldVal) {
this.app.bearingBarPitch = ''
this.app.crossBarPitch = ''
},
crossBarPitchTrigger(newVal, oldVal) {
if (this.app.loadType === 'pointedLoad') {
this.app.bearingBarHeight = ''
const data = {
gratingType: this.app.gratingType,
crossBarPitch: this.app.crossBarPitch
}
this.$axios.post('/api/public/calculation/relativeValues', data)
.then(res => {
this.relativeValues = res.data
})
.catch(err => {
this.relativeValues = null
})
}
},
vehicleClassTrigger(newVal, oldVal) {
this.app.crossBarPitch = ''
if (newVal === 'class1') this.app.loadType = 'distributedLoad'
else this.app.loadType = 'pointedLoad'
},
methodTrigger(newVal, oldVal) {
if (newVal === 'classified') {
this.app.vehicleClass = 'class1'
this.app.loadType = 'distributedLoad'
} else {
this.app.vehicleClass = ''
this.app.loadType = 'pointedLoad'
}
},
waiting() {
setTimeout(() => {
this.$gsap.to($('.app .appResult'), {opacity: 1, minHeight: 145, height: 'auto', paddingTop: 30, paddingBottom: 30, duration: 0.5})
}, 100)
} }
}, },
mixins: [fadeInAnimation], mixins: [fadeInAnimation],
methods: {}, methods: {
calculate() {
this.validation = {}
this.waiting = true
this.appResult = null
this.$axios.post('/api/public/calculate', this.app)
.then(res => {
this.waiting = false
this.appResult = res.data
})
.catch(err => {
this.waiting = false
if (err.response.status === 422) this.validation = err.response.data.validation
})
}
},
head() { head() {
return { return {
htmlAttrs: { htmlAttrs: {
title: this.staticData.hero title: this.staticData.hero
} }
} }
},
async asyncData({$axios}) {
const calculationValues = await $axios.get('/api/public/calculation/values')
return {
calculationValues: calculationValues.data
}
} }
} }
</script> </script>
+15 -14
View File
@@ -7,23 +7,29 @@
<div class="row"> <div class="row">
<div class="col-12 p1"> <div class="col-12 p1">
<h2 class="title">{{ staticData.t1 }}</h2> <h2 class="title">{{ staticData.t1 }}</h2>
<p>{{staticData.t2}}</p> <!-- <p>{{staticData.t2}}</p>-->
</div> </div>
<div class="col-12 p2"> <div class="col-12 p2">
<ul> <ul>
<li> <li>
<i class="fas fa-map-marker-alt"></i> <i class="fas fa-map-marker-alt"></i>
<span>{{staticData.t3}}</span> <span>{{ $store.state.global.address[$route.params.lang] }}</span>
</li> </li>
<li> <li>
<i class="fas fa-phone"></i> <i class="fas fa-phone"></i>
<a href="tel: +988634132704">Tell: +98 86 3 413 2704 - 7</a> <a :href="'tel:' + $store.state.global.tell">
<span>{{ staticData.t15 }}</span>
<b class="phone-number">{{ $store.state.global.tell_view }}</b>
</a>
- -
<a href="tel: +988634132703">Fax: +98 86 3 413 27 03</a> <a :href="'tel:' + $store.state.global.fax">
<span>{{ staticData.t16 }}</span>
<b class="phone-number">{{ $store.state.global.fax_view }}</b>
</a>
</li> </li>
<li> <li>
<i class="fas fa-envelope"></i> <i class="fas fa-envelope"></i>
<a href="mailto: info@arakrail.com">info@arakrail.com</a> <a :href="'mailto:' + $store.state.global.email">{{ $store.state.global.email }}</a>
</li> </li>
</ul> </ul>
</div> </div>
@@ -33,18 +39,13 @@
<p>{{ staticData.t5 }}</p> <p>{{ staticData.t5 }}</p>
<ul> <ul>
<li> <li>
<a href="" target="_blank"> <a :href="$store.state.global.instagram_url" target="_blank">
<i class="fab fa-facebook-f"></i> <i class="fab fa-instagram"></i>
</a> </a>
</li> </li>
<li> <li>
<a href="" target="_blank"> <a :href="$store.state.global.linkedin_url" target="_blank">
<i class="fab fa-twitter"></i> <i class="fab fa-linkedin-in"></i>
</a>
</li>
<li>
<a href="" target="_blank">
<i class="fab fa-telegram-plane"></i>
</a> </a>
</li> </li>
</ul> </ul>
+7 -8
View File
@@ -111,10 +111,10 @@
</div> </div>
<div class="products"> <div class="products">
<div class="parts p2 row"> <div class="parts p2 row">
<div class="col-12 col-sm-6 col-lg-4 mb-5 anim-fadeIn" v-for="(item,index) in products" :key="item._id" v-if="index <= 5"> <div class="col-12 col-sm-6 col-lg-4 mb-5 anim-fadeIn" v-for="item in favoriteProducts" :key="item._id">
<nuxt-link :to="{name: 'lang-products-product',params: {lang: $route.params.lang,product: item._id}}" class="product"> <nuxt-link :to="{name: 'lang-products-product',params: {lang: $route.params.lang,product: item._id}}" class="product">
<div class="imgBox"> <div class="imgBox">
<img :src="item.cover" :alt="item.product_details[$route.params.lang].name"> <img :src="item.thumb" :alt="item.product_details[$route.params.lang].name">
</div> </div>
<p>{{ item.product_details[$route.params.lang].name }}</p> <p>{{ item.product_details[$route.params.lang].name }}</p>
</nuxt-link> </nuxt-link>
@@ -132,7 +132,7 @@
<div class="txt anim-parallax"> <div class="txt anim-parallax">
<h2 class="title title-shape">{{ staticData.s4.t1 }} <span>{{ staticData.s4.t2 }}</span></h2> <h2 class="title title-shape">{{ staticData.s4.t1 }} <span>{{ staticData.s4.t2 }}</span></h2>
<p>{{ staticData.s4.t3 }}</p> <p>{{ staticData.s4.t3 }}</p>
<a :href="catalog.file" target="_blank" class="btn btn-reverse-fill">{{staticData.s4.link}}</a> <a v-if="catalog && catalog.file" :href="catalog.file[$route.params.lang]" target="_blank" class="btn btn-reverse-fill">{{ staticData.s4.link }}</a>
</div> </div>
</section> </section>
@@ -145,8 +145,7 @@
<div class="col-12 col-lg-6"> <div class="col-12 col-lg-6">
<h2 class="title title-shape">{{ staticData.s6.t1 }}</h2> <h2 class="title title-shape">{{ staticData.s6.t1 }}</h2>
<p>{{ staticData.s6.t2 }}</p> <p>{{ staticData.s6.t2 }}</p>
<!-- <nuxt-link :to="{name: 'lang-calculation',params: {lang: $route.params.lang}}" class="btn btn-primary">{{staticData.s6.link1}}</nuxt-link>--> <nuxt-link :to="{name: 'lang-calculation',params: {lang: $route.params.lang}}" class="btn btn-primary">{{ staticData.s6.link1 }}</nuxt-link>
<a @click.prevent="notAvailable" href="" class="btn btn-primary">{{staticData.s6.link1}}</a>
<a @click.prevent="notAvailable" :href="calc_app_link" target="_blank" class="btn btn-primary-fill">{{ staticData.s6.link2 }}</a> <a @click.prevent="notAvailable" :href="calc_app_link" target="_blank" class="btn btn-primary-fill">{{ staticData.s6.link2 }}</a>
</div> </div>
<div class="col-2 img-side d-none d-lg-block"> <div class="col-2 img-side d-none d-lg-block">
@@ -166,7 +165,7 @@
data() { data() {
return { return {
slider: null, slider: null,
products: null, favoriteProducts: null,
catalog: null, catalog: null,
calc_app_link: this.$store.state.staticData.calc_app_link, calc_app_link: this.$store.state.staticData.calc_app_link,
validation: [] validation: []
@@ -213,12 +212,12 @@
}, },
async asyncData({$axios}) { async asyncData({$axios}) {
const slider = await $axios.get('/api/public/slider') const slider = await $axios.get('/api/public/slider')
const products = await $axios.get(`/api/public/products`) const favoriteProducts = await $axios.get(`/api/public/favoriteProducts`)
const catalog = await $axios.get('/api/public/catalog') const catalog = await $axios.get('/api/public/catalog')
return { return {
slider: slider.data, slider: slider.data,
products: products.data, favoriteProducts: favoriteProducts.data,
catalog: catalog.data catalog: catalog.data
} }
} }
+20 -18
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page product-details--page"> <div class="page product-details--page latin-digits">
<Hero :title="staticData.hero"/> <Hero :title="staticData.hero"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
@@ -8,12 +8,10 @@
<p>{{ productDetails.page_description }}</p> <p>{{ productDetails.page_description }}</p>
<div class="image-preview"> <div class="image-preview">
<img :src="product.cover" class="anim-fadeIn" ref="preview" :alt="productDetails.name"> <img :src="product.cover" class="anim-fadeIn" ref="preview" :alt="productDetails.name">
</div> <div class="images-carousel anim-fadeIn" v-if="product.images.length">
</div>
<div class="images-carousel anim-fadeIn">
<div id="images"> <div id="images">
<div class="imgBox"> <div class="imgBox">
<img :src="product.cover" :alt="productDetails.name" @click="view(product.cover)"> <img class="selected" :src="product.cover" :alt="productDetails.name" @click="view(product.cover)">
</div> </div>
<div class="imgBox" v-for="item in product.images" :key="item._id"> <div class="imgBox" v-for="item in product.images" :key="item._id">
<img :src="item.image" :alt="productDetails.name" @click="view(item.image)"> <img :src="item.image" :alt="productDetails.name" @click="view(item.image)">
@@ -21,6 +19,9 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</section> </section>
<section class="s2" v-if="product.more_section"> <section class="s2" v-if="product.more_section">
@@ -61,27 +62,24 @@
</section> </section>
<section class="s3" <section class="s3"
v-if="!product.render_image1.includes('undefined') || v-if="product.render_image1 ||
!product.render_image2.includes('undefined') || product.render_image2 ||
product.download_section"> product.download_section">
<div class="container"> <div class="container">
<div class="panel"> <div class="panel">
<div class="parts p1" v-if="!product.render_image1.includes('undefined') || !product.render_image1.includes('undefined')"> <div class="parts p1" v-if="product.render_image1 || product.render_image1">
<h2 class="title">{{ staticData.t2 }}</h2> <h2 class="title">{{ staticData.t2 }}</h2>
<p>{{ staticData.t3 }}</p> <p>{{ staticData.t3 }}</p>
</div> </div>
<div class="row parts p2" v-if="!product.render_image1.includes('undefined') || !product.render_image2.includes('undefined')"> <div class="row parts p2" v-if="product.render_image1 || product.render_image2">
<div class="col-12 col-sm-6 mb-5"> <div class="col-12 col-sm-6 mb-5">
<img :src="product.render_image1" class="anim-fadeIn" :alt="productDetails.name" v-if="!product.render_image1.includes('undefined')"> <img :src="product.render_image1" class="anim-fadeIn" :alt="productDetails.name" v-if="product.render_image1">
<p v-if="!product.render_image1.includes('undefined')">{{productDetails.render_caption1}}</p> <p v-if="product.render_image1">{{ productDetails.render_caption1 }}</p>
</div> </div>
<div class="col-12 col-sm-6 mb-5"> <div class="col-12 col-sm-6 mb-5">
<img :src="product.render_image2" class="anim-fadeIn" :alt="productDetails.name" v-if="!product.render_image2.includes('undefined')"> <img :src="product.render_image2" class="anim-fadeIn" :alt="productDetails.name" v-if="product.render_image2">
<p v-if="!product.render_image2.includes('undefined')">{{productDetails.render_caption2}}</p> <p v-if="product.render_image2">{{ productDetails.render_caption2 }}</p>
</div>
<div class="col-12 mb-5">
<img :src="product.chart_image" class="anim-fadeIn" :alt="productDetails.name" v-if="!product.chart_image.includes('undefined')">
</div> </div>
</div> </div>
@@ -90,6 +88,9 @@
<h2 class="title">{{ productDetails.chart_title }}</h2> <h2 class="title">{{ productDetails.chart_title }}</h2>
<p>{{ productDetails.chart_description }}</p> <p>{{ productDetails.chart_description }}</p>
</div> </div>
<div class="col-12 mb-5 mt-5">
<img :src="product.chart_image" class="anim-fadeIn" :alt="productDetails.name" v-if="product.chart_image">
</div>
</div> </div>
<div class="row parts p4" v-if="product.download_section"> <div class="row parts p4" v-if="product.download_section">
@@ -99,7 +100,7 @@
<div class="file anim-fadeIn" v-for="item in product.pdf_files" :key="item._id"> <div class="file anim-fadeIn" v-for="item in product.pdf_files" :key="item._id">
<pdf-icon/> <pdf-icon/>
<p>{{ item.pdf_details[$route.params.lang].name }}</p> <p>{{ item.pdf_details[$route.params.lang].name }}</p>
<a :href="item.file" :download="item.pdf_details[$route.params.lang].name" target="_blank" class="btn btn-primary-fill">{{staticData.t5}}</a> <a :href="item.file[$route.params.lang]" :download="item.pdf_details[$route.params.lang].name" target="_blank" class="btn btn-primary-fill">{{ staticData.t5 }}</a>
</div> </div>
</div> </div>
</div> </div>
@@ -140,8 +141,9 @@
}, },
methods: { methods: {
view(image) { view(image) {
// console.log(image)
this.$refs.preview.src = image this.$refs.preview.src = image
$('.product-details--page #images img').removeClass('selected')
$(event.target).addClass('selected')
} }
}, },
mixins: [fadeInAnimation], mixins: [fadeInAnimation],
+3 -3
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page products--page"> <div class="page products--page latin-digits">
<Hero :title="staticData.hero"/> <Hero :title="staticData.hero"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
@@ -30,7 +30,7 @@
<div class="col-12 col-sm-6 col-lg-4 col-xl-3 mb-5 anim-fadeIn" v-for="item in filtered_products" :key="item._id"> <div class="col-12 col-sm-6 col-lg-4 col-xl-3 mb-5 anim-fadeIn" v-for="item in filtered_products" :key="item._id">
<nuxt-link :to="{name: 'lang-products-product',params: {lang: $route.params.lang,product: item._id}}" class="product"> <nuxt-link :to="{name: 'lang-products-product',params: {lang: $route.params.lang,product: item._id}}" class="product">
<div class="imgBox"> <div class="imgBox">
<img :src="item.cover" :alt="item.product_details[$route.params.lang].name"> <img :src="item.thumb" :alt="item.product_details[$route.params.lang].name">
</div> </div>
<h4>{{ item.product_details[$route.params.lang].name }}</h4> <h4>{{ item.product_details[$route.params.lang].name }}</h4>
<p>{{ item.product_details[$route.params.lang].short_description }}</p> <p>{{ item.product_details[$route.params.lang].short_description }}</p>
@@ -53,7 +53,7 @@
<span class="subtitle">{{ staticData.s3.t2 }}</span> <span class="subtitle">{{ staticData.s3.t2 }}</span>
</h2> </h2>
<p>{{ staticData.s3.t3 }}</p> <p>{{ staticData.s3.t3 }}</p>
<a :href="catalog.file" target="_blank" class="btn btn-reverse-fill">{{staticData.s3.t4}}</a> <a v-if="catalog && catalog.file" :href="catalog.file[$route.params.lang]" target="_blank" class="btn btn-reverse-fill">{{ staticData.s3.t4 }}</a>
</div> </div>
</div> </div>
</section> </section>
+2 -2
View File
@@ -70,8 +70,8 @@
}, },
methods: { methods: {
jDate(date) { jDate(date) {
if (this.$route.params.lang === 'fa') return moment(date).format('jYYYY/jMM/jDD') if (this.$route.params.lang === 'fa') return moment(date).jYear()
else return date.split(' ')[0] else return moment(date).year()
} }
}, },
mixins: [fadeInAnimation], mixins: [fadeInAnimation],
+2 -2
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page tech-info--page"> <div class="page tech-info--page latin-digits">
<Hero :title="staticData.title"/> <Hero :title="staticData.title"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
@@ -21,7 +21,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h2 class="title">{{ staticData.t6 }}</h2> <h2 class="title">{{ staticData.t6 }}</h2>
<nuxt-link :to="{name: 'lang-products',params: {lang: $route.params.lang}}" class="btn btn-primary">{{staticData.t7}}</nuxt-link> <nuxt-link :to="{name: 'lang-calculation',params: {lang: $route.params.lang}}" class="btn btn-primary">{{ staticData.t7 }}</nuxt-link>
</div> </div>
</div> </div>
</div> </div>
+3 -15
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page tech-info--page"> <div class="page tech-info--page latin-digits">
<Hero :title="staticData.title"/> <Hero :title="staticData.title"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
@@ -26,20 +26,8 @@
<p>{{ staticData.t13 }}</p> <p>{{ staticData.t13 }}</p>
<ul> <ul>
<li> <li v-for="item in $store.state.staticData.about.en.s4" :key="item.title">
<p>{{staticData.t14}}</p> <a :href="`/standards_pdf/${item.link.url}`" download target="_blank">{{ item.title }}</a>
</li>
<li>
<p>{{staticData.t15}}</p>
</li>
<li>
<p>{{staticData.t16}}</p>
</li>
<li>
<p>{{staticData.t17}}</p>
</li>
<li>
<p>{{staticData.t18}}</p>
</li> </li>
</ul> </ul>
</div> </div>
+1 -1
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page tech-info--page"> <div class="page tech-info--page latin-digits">
<Hero :title="staticData.title"/> <Hero :title="staticData.title"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
+11 -1
View File
@@ -1,5 +1,5 @@
<template> <template>
<div class="page tech-info--page"> <div class="page tech-info--page latin-digits">
<Hero :title="staticData.title"/> <Hero :title="staticData.title"/>
<section class="s1"> <section class="s1">
<div class="container"> <div class="container">
@@ -40,6 +40,16 @@
<p>{{ staticData.t14 }}</p> <p>{{ staticData.t14 }}</p>
</li> </li>
</ul> </ul>
<h2 class="first mt-5">{{ staticData.t17 }}</h2>
<div class="images">
<img src="~/assets/img/grating-usage/4.jpg" :alt="staticData.title">
<img src="~/assets/img/grating-usage/8.jpg" :alt="staticData.title">
<img src="~/assets/img/grating-usage/13.jpg" :alt="staticData.title">
<img src="~/assets/img/grating-usage/88-wood-1.jpg" :alt="staticData.title">
<img src="~/assets/img/grating-usage/industri-2.jpg" :alt="staticData.title">
<img src="~/assets/img/grating-usage/infills-1b.jpg" :alt="staticData.title">
</div>
</div> </div>
</div> </div>
</div> </div>
+1
View File
@@ -154,6 +154,7 @@
message: 'پست با موفقیت بروزرسانی شد.', message: 'پست با موفقیت بروزرسانی شد.',
type: 'success' type: 'success'
}) })
this.post = response.data
}).catch(error => { }).catch(error => {
if (error.response.status === 422) { if (error.response.status === 422) {
this.validation = error.response.data.validation this.validation = error.response.data.validation
+33 -8
View File
@@ -2,17 +2,37 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<admin-title-bar :title="title"></admin-title-bar> <admin-title-bar :title="title"></admin-title-bar>
<div class="col-6"> <div class="col-12">
<admin-panel> <admin-panel>
<h2>افزودن یا بروزرسانی کاتالوگ:</h2> <h2>افزودن یا بروزرسانی کاتالوگ:</h2>
</admin-panel>
</div>
<div class="col-6">
<admin-panel>
<h2>کاتالوگ فارسی:</h2>
<el-divider></el-divider> <el-divider></el-divider>
<el-form> <el-form>
<input type="file" ref="file"> <input type="file" ref="file_fa">
<el-button @click="upload" type="success">افزودن</el-button> <el-button @click="upload('fa')" type="success">افزودن</el-button>
<p style="color: red;" v-if="validation.pdf">{{validation.pdf.msg}}</p> <p style="color: red;" v-if="validation.pdf && locale === 'fa'">{{ validation.pdf.msg }}</p>
</el-form> </el-form>
<el-divider></el-divider> <el-divider></el-divider>
<a v-if="catalog && catalog.file" :href="catalog.file" target="_blank"> <a v-if="catalog && catalog.file && catalog.file.fa" :href="catalog.file.fa" target="_blank">
<el-button>دانلود و مشاهده کاتالوگ فعلی</el-button>
</a>
</admin-panel>
</div>
<div class="col-6">
<admin-panel>
<h2>کاتالوگ انگلیسی:</h2>
<el-divider></el-divider>
<el-form>
<input type="file" ref="file_en">
<el-button @click="upload('en')" type="success">افزودن</el-button>
<p style="color: red;" v-if="validation.pdf && locale === 'en'">{{ validation.pdf.msg }}</p>
</el-form>
<el-divider></el-divider>
<a v-if="catalog && catalog.file && catalog.file.en" :href="catalog.file.en" target="_blank">
<el-button>دانلود و مشاهده کاتالوگ فعلی</el-button> <el-button>دانلود و مشاهده کاتالوگ فعلی</el-button>
</a> </a>
</admin-panel> </admin-panel>
@@ -27,6 +47,7 @@
data() { data() {
return { return {
catalog: null, catalog: null,
locale: null,
validation: {}, validation: {},
uploading: false, uploading: false,
uploadProgress: null uploadProgress: null
@@ -47,10 +68,13 @@
} }
}, },
methods: { methods: {
upload() { upload(locale) {
this.locale = locale
this.validation = {} this.validation = {}
locale === 'fa' ? this.$refs.file_en.value = null : this.$refs.file_fa.value = null
const data = new FormData() const data = new FormData()
data.append('pdf', this.$refs.file.files[0]) data.append('locale', locale)
locale === 'fa' ? data.append('pdf', this.$refs.file_fa.files[0]) : data.append('pdf', this.$refs.file_en.files[0])
const axiosConfig = { const axiosConfig = {
onUploadProgress: progressEvent => { onUploadProgress: progressEvent => {
@@ -69,7 +93,8 @@
type: 'success', type: 'success',
message: 'کاتالوگ با موفقیت آپلود شد' message: 'کاتالوگ با موفقیت آپلود شد'
}) })
this.$refs.file.value = null this.$refs.file_fa.value = null
this.$refs.file_en.value = null
this.catalog = res.data this.catalog = res.data
}) })
.catch(err => { .catch(err => {
+11 -2
View File
@@ -3,8 +3,8 @@
<el-form @submit.native.prevent="loginFunction"> <el-form @submit.native.prevent="loginFunction">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12 d-flex justify-content-center align-items-center" style="min-height: calc(100vh - 60px);">
<admin-panel style="width: 50%;margin: 300px auto 0"> <admin-panel class="login">
<h1 style="text-align: center;">ورود به پنل مدیریت</h1> <h1 style="text-align: center;">ورود به پنل مدیریت</h1>
<el-divider></el-divider> <el-divider></el-divider>
<el-form-item prop="username" :class="validation.username ? 'is-error' : ''" label="نام کاربری"> <el-form-item prop="username" :class="validation.username ? 'is-error' : ''" label="نام کاربری">
@@ -55,3 +55,12 @@
layout: 'admin' layout: 'admin'
} }
</script> </script>
<style lang="scss" scoped>
.login {
width: 100%;
max-width: 600px;
margin: 150px auto!important;
}
</style>
+46 -20
View File
@@ -2,7 +2,7 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<admin-title-bar :title="title"> <admin-title-bar :title="title">
<el-button @click="$router.back()" type="primary">برگشت به صفحه قبل</el-button> <el-button @click="$router.push({name: 'admin-products'})" type="primary">برگشت به صفحه قبل</el-button>
<el-button type="success" @click="upload">بروزرسانی</el-button> <el-button type="success" @click="upload">بروزرسانی</el-button>
</admin-title-bar> </admin-title-bar>
@@ -30,6 +30,10 @@
<el-switch v-model="formData.download_section" style="margin-right: 15px;"></el-switch> <el-switch v-model="formData.download_section" style="margin-right: 15px;"></el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="published" label="در صفحه اصلی باشد">
<el-switch v-model="formData.favorite" style="margin-right: 15px;"></el-switch>
</el-form-item>
</el-form> </el-form>
</admin-panel> </admin-panel>
</div> </div>
@@ -41,7 +45,7 @@
<img :src="formData.cover" alt="" style="width: 100%;max-width: 300px;display: block"> <img :src="formData.cover" alt="" style="width: 100%;max-width: 300px;display: block">
<input type="file" ref="cover" @change="previewCover"> <input type="file" ref="cover" @change="previewCover">
<p class="err" v-if="validation.cover">{{ validation.cover.msg }}</p> <p class="err" v-if="validation.cover">{{ validation.cover.msg }}</p>
<p v-else style="margin-top: 20px;color: green;">ابعاد تصویر باید 470px عرض و 395px ارتفاع باشد، در غیر این صورت عکس به صورت اوتوماتیک برش خواهد خورد.</p> <p v-else style="margin-top: 20px;color: green;">ابعاد تصویر باید 1010px عرض و 534px ارتفاع باشد، در غیر این صورت عکس به صورت اوتوماتیک برش خواهد خورد.</p>
</admin-panel> </admin-panel>
</div> </div>
@@ -263,7 +267,7 @@
<img :src="productImage" alt="" style="width: 100%;max-width: 300px;display: block"> <img :src="productImage" alt="" style="width: 100%;max-width: 300px;display: block">
<input type="file" ref="gallery" @change="previewGallery"> <input type="file" ref="gallery" @change="previewGallery">
<p class="err" v-if="validation.images && validation.images.image">{{ validation.images.image.msg }}</p> <p class="err" v-if="validation.images && validation.images.image">{{ validation.images.image.msg }}</p>
<p v-else style="margin-top: 20px;color: green;">ابعاد تصویر باید 470px عرض و 395px ارتفاع باشد، در غیر این صورت عکس به صورت اوتوماتیک برش خواهد خورد.</p> <p v-else style="margin-top: 20px;color: green;">ابعاد تصویر باید 1010px عرض و 534px ارتفاع باشد، در غیر این صورت عکس به صورت اوتوماتیک برش خواهد خورد.</p>
<el-button type="primary" @click="addImage" style="margin-top: 10px;">افزودن</el-button> <el-button type="primary" @click="addImage" style="margin-top: 10px;">افزودن</el-button>
</div> </div>
<div class="images"> <div class="images">
@@ -280,9 +284,13 @@
<h2>افزودن فایل PDF</h2> <h2>افزودن فایل PDF</h2>
<el-divider></el-divider> <el-divider></el-divider>
<div class="pdf"> <div class="pdf">
<input type="file" ref="pdf"> <p>نسخه فارسی:</p>
<p class="err" style="display: inline-block" v-if="validation.pdf">{{validation.pdf.msg}}</p> <input type="file" ref="pdf_fa">
<el-button type="primary" @click="addPDF" style="margin-top: 10px;">افزودن</el-button> <p class="err" style="display: inline-block" v-if="validation.file_fa">{{ validation.file_fa.msg }}</p>
<el-divider></el-divider>
<p>نسخه انگلیسی:</p>
<input type="file" ref="pdf_en">
<p class="err" style="display: inline-block" v-if="validation.file_en">{{ validation.file_en.msg }}</p>
<el-form style="margin-top: 30px;"> <el-form style="margin-top: 30px;">
<el-form-item prop="title" :class="validation.fa_pdf ? 'is-error' : ''" label="عنوان فارسی"> <el-form-item prop="title" :class="validation.fa_pdf ? 'is-error' : ''" label="عنوان فارسی">
@@ -294,16 +302,20 @@
<p class="err" v-if="validation.en_pdf">{{ validation.en_pdf.msg }}</p> <p class="err" v-if="validation.en_pdf">{{ validation.en_pdf.msg }}</p>
</el-form-item> </el-form-item>
</el-form> </el-form>
<br>
<el-button type="primary" @click="addPDF" style="margin-top: 10px;">افزودن</el-button>
</div> </div>
<div class="PDF_Files"> <div class="PDF_Files">
<div class="file" v-for="item in formData.pdf_files" :key="item._id"> <div class="file" v-for="item in formData.pdf_files" :key="item._id">
<a :href="item.file" :download="item.pdf_details.en.name" target="_blank"> <a :href="item.file.fa" download target="_blank">
<i class="fas fa-file-pdf"></i> <i class="fas fa-file-pdf"></i>
<b>فارسی: </b> <b>فارسی: </b>
<span>{{ item.pdf_details.fa.name }}</span> <span>{{ item.pdf_details.fa.name }}</span>
</a>
<br> <br>
<!-- --> <a :href="item.file.en" download target="_blank">
<i class="fas fa-file-pdf"></i>
<b>انگلیسی: </b> <b>انگلیسی: </b>
<span>{{ item.pdf_details.en.name }}</span> <span>{{ item.pdf_details.en.name }}</span>
</a> </a>
@@ -376,6 +388,7 @@
data.append('category', this.formData.category) data.append('category', this.formData.category)
data.append('download_section', this.formData.download_section) data.append('download_section', this.formData.download_section)
data.append('more_section', this.formData.more_section) data.append('more_section', this.formData.more_section)
data.append('favorite', this.formData.favorite)
if (this.$refs.cover.files[0]) data.append('cover', this.$refs.cover.files[0]) if (this.$refs.cover.files[0]) data.append('cover', this.$refs.cover.files[0])
if (this.$refs.more_section_image1.files[0]) data.append('more_section_image1', this.$refs.more_section_image1.files[0]) if (this.$refs.more_section_image1.files[0]) data.append('more_section_image1', this.$refs.more_section_image1.files[0])
@@ -489,7 +502,8 @@
data.append('product_id', this.formData._id) data.append('product_id', this.formData._id)
data.append('fa_pdf', this.fa_pdf) data.append('fa_pdf', this.fa_pdf)
data.append('en_pdf', this.en_pdf) data.append('en_pdf', this.en_pdf)
data.append('pdf', this.$refs.pdf.files[0]) data.append('file_fa', this.$refs.pdf_fa.files[0])
data.append('file_en', this.$refs.pdf_en.files[0])
this.$axios.post(`/api/private/productPDF`, data) this.$axios.post(`/api/private/productPDF`, data)
.then(res => { .then(res => {
@@ -499,7 +513,8 @@
}) })
this.fa_pdf = '' this.fa_pdf = ''
this.en_pdf = '' this.en_pdf = ''
this.$refs.pdf.value = null this.$refs.pdf_fa.value = null
this.$refs.pdf_en.value = null
this.formData = res.data this.formData = res.data
}) })
.catch(err => { .catch(err => {
@@ -550,22 +565,22 @@
this.formData.cover = URL.createObjectURL(event.target.files[0]) this.formData.cover = URL.createObjectURL(event.target.files[0])
}, },
previewMore_section_image1(event) { previewMore_section_image1(event) {
this.formData.more_section_image1 = URL.createObjectURL(event.target.files[0]) this.$set(this.formData, 'more_section_image1', URL.createObjectURL(event.target.files[0]))
}, },
previewMore_section_image2(event) { previewMore_section_image2(event) {
this.formData.more_section_image2 = URL.createObjectURL(event.target.files[0]) this.$set(this.formData, 'more_section_image2', URL.createObjectURL(event.target.files[0]))
}, },
previewRender_image1(event) { previewRender_image1(event) {
this.formData.render_image1 = URL.createObjectURL(event.target.files[0]) this.$set(this.formData, 'render_image1', URL.createObjectURL(event.target.files[0]))
}, },
previewRender_image2(event) { previewRender_image2(event) {
this.formData.render_image1 = URL.createObjectURL(event.target.files[0]) this.$set(this.formData, 'render_image2', URL.createObjectURL(event.target.files[0]))
}, },
previewGallery(event) { previewGallery(event) {
this.productImage = URL.createObjectURL(event.target.files[0]) this.productImage = URL.createObjectURL(event.target.files[0])
}, },
previewChart_image(event) { previewChart_image(event) {
this.formData.chart_image = URL.createObjectURL(event.target.files[0]) this.$set(this.formData, 'chart_image', URL.createObjectURL(event.target.files[0]))
} }
}, },
head() { head() {
@@ -663,18 +678,28 @@
margin-bottom: 20px; margin-bottom: 20px;
background: rgba(#000, 0.03); background: rgba(#000, 0.03);
padding: 5px; padding: 5px;
padding-left: 80px;
position: relative; position: relative;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
a {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 5px;
transition: 0.3s;
&:hover {
background-color: rgba(#000, 0.1);
}
i { i {
display: block; font-size: 25px;
height: 100%; margin-left: 10px;
width: 50px;
float: right;
font-size: 50px;
} }
} }
@@ -690,5 +715,6 @@
-o-transform: translateY(-50%); -o-transform: translateY(-50%);
} }
} }
}
</style> </style>
+25 -3
View File
@@ -8,8 +8,13 @@
</admin-title-bar> </admin-title-bar>
<div class="col-lg-12"> <div class="col-lg-12">
<admin-panel> <admin-panel>
<el-button-group class="filterBtns">
<el-button :type="filter ? 'success' : 'primary'" @click="filter = true">محصولات صفحه اصلی</el-button>
<el-button :type="!filter ? 'success' : 'primary'" @click="filter = false">تمام محصولات</el-button>
</el-button-group>
<el-divider></el-divider>
<el-table <el-table
:data="products" :data="filteredProducts"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
type="index" type="index"
@@ -22,7 +27,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
:src="scope.row.cover" :src="scope.row.thumb"
fit="fit"> fit="fit">
</el-image> </el-image>
</template> </template>
@@ -67,7 +72,8 @@
return { return {
title: 'لیست محصولات', title: 'لیست محصولات',
products: null, products: null,
productCategories: null productCategories: null,
filter: false
} }
}, },
head() { head() {
@@ -75,6 +81,13 @@
title: this.title, title: this.title,
} }
}, },
computed: {
filteredProducts() {
if (this.filter) return this.products.filter(item => item.favorite)
else return this.products
}
},
methods: { methods: {
categoryName(id) { categoryName(id) {
let category = this.productCategories.filter(item => { let category = this.productCategories.filter(item => {
@@ -127,3 +140,12 @@
} }
} }
</script> </script>
<style lang="scss">
.filterBtns {
span {
color: #fff !important;
}
}
</style>
+8 -2
View File
@@ -31,6 +31,10 @@
<el-switch v-model="formData.download_section" style="margin-right: 15px;"></el-switch> <el-switch v-model="formData.download_section" style="margin-right: 15px;"></el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="published" label="در صفحه اصلی باشد">
<el-switch v-model="formData.favorite" style="margin-right: 15px;"></el-switch>
</el-form-item>
</el-form> </el-form>
</admin-panel> </admin-panel>
</div> </div>
@@ -42,7 +46,7 @@
<img :src="formData.cover" alt="" style="width: 100%;max-width: 300px;display: block"> <img :src="formData.cover" alt="" style="width: 100%;max-width: 300px;display: block">
<input type="file" ref="cover" @change="previewCover"> <input type="file" ref="cover" @change="previewCover">
<p class="err" v-if="validation.cover">{{ validation.cover.msg }}</p> <p class="err" v-if="validation.cover">{{ validation.cover.msg }}</p>
<p v-else style="margin-top: 20px;color: green;">ابعاد تصویر باید 470px عرض و 395px ارتفاع باشد، در غیر این صورت عکس به صورت اوتوماتیک برش خواهد خورد.</p> <p v-else style="margin-top: 20px;color: green;">ابعاد تصویر باید 1010px عرض و 534px ارتفاع باشد، در غیر این صورت عکس به صورت اوتوماتیک برش خواهد خورد.</p>
</admin-panel> </admin-panel>
</div> </div>
@@ -275,6 +279,7 @@
category: '', category: '',
more_section: true, more_section: true,
download_section: true, download_section: true,
favorite: false,
product_details: { product_details: {
fa: { fa: {
name: '', name: '',
@@ -361,6 +366,7 @@
data.append('category', this.formData.category) data.append('category', this.formData.category)
data.append('download_section', this.formData.download_section) data.append('download_section', this.formData.download_section)
data.append('more_section', this.formData.more_section) data.append('more_section', this.formData.more_section)
data.append('favorite', this.formData.favorite)
data.append('cover', this.$refs.cover.files[0]) data.append('cover', this.$refs.cover.files[0])
data.append('more_section_image1', this.$refs.more_section_image1.files[0]) data.append('more_section_image1', this.$refs.more_section_image1.files[0])
@@ -417,7 +423,7 @@
this.formData.render_image1 = URL.createObjectURL(event.target.files[0]); this.formData.render_image1 = URL.createObjectURL(event.target.files[0]);
}, },
previewRender_image2(event) { previewRender_image2(event) {
this.formData.render_image1 = URL.createObjectURL(event.target.files[0]); this.formData.render_image2 = URL.createObjectURL(event.target.files[0]);
}, },
previewChart_image(event) { previewChart_image(event) {
this.formData.chart_image = URL.createObjectURL(event.target.files[0]); this.formData.chart_image = URL.createObjectURL(event.target.files[0]);
+18 -1
View File
@@ -1,3 +1,20 @@
export const state = () => ({}) export const state = () => ({
email: 'info@arakrail.com',
tell: '+988634132704',
tell_view: '+98 86 3 413 2704 - 7',
fax: '+988634132703',
fax_view: '+98 86 3 413 27 03',
address: {
fa: 'استان مرکزی، اراک، شهرک قطب صنعتی، خیابان تلاش، همت 6، توسعه 3',
en: 'No.3 Tose-e St., No.6 Hemmat St., Industrial Pole District, Arak City, Markazi Province, Iran'
},
instagram_url: 'https://instagram.com/arakrail_grating',
linkedin_url: 'https://www.linkedin.com/in/arak-rail-co-27040937',
meta_description: {
fa: 'شرکت اراک ریل در تاریخ ۱۳۷۰/۰۳/۲۹ با هدف تولید بخشی از قطعات و مجموعه های وارداتی مورد مصرف در صنایع ایران به خصوص راه آهن ، با مجوز وزارت صنایع ، تاسیس و در مساحت حدود ۶۰۰۰ متر مربع و با بیش از ۱۵۰۰ متر مربع کارگاه با مجموعه ای از امکانات ماشین کاری ، برش کاری ، پرس کاری و جوش کاری راه اندازی شد .شرکت اراک ریل مفتخر است که از سال ۱۳۸۵ برای اولین بار در کشور ...',
en: 'Arak Rail Company was established on 1370/03/29 with the aim of producing a part of imported parts and assemblies used in Iranian industries, especially railways, with the permission of the Ministry of Industry, in an area of about 6000 square meters and with more than 1500 square meters. The workshop was set up with a set of machining, cutting, pressing and welding facilities. Arak Rail Company is proud to be the first in the country since 2006 ...'
},
calc_app_link: ''
})
export const mutations = {} export const mutations = {}
+294 -94
View File
@@ -42,12 +42,7 @@ export const state = () => ({
t3: 'فکس:', t3: 'فکس:',
t4: 'ایمیل:', t4: 'ایمیل:',
t5: 'تمامی اطلاعات این سایت برای شرکت اراک ریل محفوظ است', t5: 'تمامی اطلاعات این سایت برای شرکت اراک ریل محفوظ است',
t6: 'شرکت اراک ریل.', t6: 'شرکت اراک ریل.'
address: 'استان مرکزی، اراک، شهرک قطب صنعتی، خیابان تلاش، همت 6، توسعه 3',
tell: '+98 86 3 413 2704 - 7',
fax: '+98 86 3 413 27 03',
email: 'info@arakrail.com'
}, },
en: { en: {
t1: 'Address:', t1: 'Address:',
@@ -55,11 +50,7 @@ export const state = () => ({
t3: 'Fax:', t3: 'Fax:',
t4: 'Email:', t4: 'Email:',
t5: 'All information on this site is reserved for Arak Rail Company', t5: 'All information on this site is reserved for Arak Rail Company',
t6: 'Arak Rail Co.', t6: 'Arak Rail Co.'
address: 'No.3 Tose-e St., No.6 Hemmat St., Industrial Pole District, Arak City, Markazi Province, Iran',
tell: '+98 86 3 413 2704 - 7',
fax: '+98 86 3 413 27 03',
email: 'info@arakrail.com'
} }
}, },
customersCommunication: { customersCommunication: {
@@ -85,12 +76,12 @@ export const state = () => ({
s1_2: { s1_2: {
t1: 'تاریخچه و افتخارات', t1: 'تاریخچه و افتخارات',
t2: 'تاسیس شرکت', t2: 'تاسیس شرکت',
t3: 'شرکت اراک ریل در سال 1370 با هدف تولید بخشی از قطعات و مجموعه های وارداتی مورد مصرف در صنایع ایران راه اندازی شد. در سالهای اولیه فعالیت همزمان با تولید گریتینگ، تعمیرات اساسی واگن، ساخت تامپون و تعمیرات بوژی جز ضمینه های اصلی کار شرکت بوده است.', t3: 'شرکت اراک ریل در سال 1370 با هدف تولید بخشی از قطعات و مجموعه های وارداتی مورد مصرف در صنایع ایران راه اندازی شد. در سالهای اولیه فعالیت همزمان با تولید گریتینگ، تعمیرات اساسی واگن، ساخت تامپون و تعمیرات بوژی جز زمینه های اصلی کار شرکت بوده است.',
link: 'بیشتر' link: 'بیشتر'
}, },
s2: { s2: {
t1: 'خدمات ما', t1: 'خدمات ما',
t2: 'تیم مهندسی شرکت اراک ریل برای انتخاب محصولی با بالاترین کیفیت، استحکام و طول عمر، آماده ارائه مشاوره در پروژهای شما می باشد.', t2: 'تیم مهندسی شرکت اراک ریل برای انتخاب محصولی با بالاترین کیفیت، استحکام و طول عمر، آماده ارائه مشاوره در پروژه های شما می باشد.',
link1: 'آشنایی با فرایند', link1: 'آشنایی با فرایند',
t3: 'کنترل دقیق فرآیند تولید', t3: 'کنترل دقیق فرآیند تولید',
t4: 'دپارتمان کنترل کیفی شرکت اراک ریل با کنترل دقیق فرآیند تولید گریتینگ در کلیه بخشها، و با تسلط کامل بر استانداردهای روز دنیا تطابق کامل محصول نهایی با استاندارد مورد نظر را تضمین می کند.', t4: 'دپارتمان کنترل کیفی شرکت اراک ریل با کنترل دقیق فرآیند تولید گریتینگ در کلیه بخشها، و با تسلط کامل بر استانداردهای روز دنیا تطابق کامل محصول نهایی با استاندارد مورد نظر را تضمین می کند.',
@@ -122,7 +113,7 @@ export const state = () => ({
s6: { s6: {
t1: 'نرم افزار محاسبه وزن گریتینگ', t1: 'نرم افزار محاسبه وزن گریتینگ',
t2: 'نرم افزار طراحی شده در این بخش، با انجام محاسبات دقیق، آنالیز وزن و مقاومتی گریتینگ را ارائه می کند، با استفاده از این ابزار انتخاب محصول برای شما آسان تر خواهد بود.', t2: 'نرم افزار طراحی شده در این بخش، با انجام محاسبات دقیق، آنالیز وزن و مقاومتی گریتینگ را ارائه می کند، با استفاده از این ابزار انتخاب محصول برای شما آسان تر خواهد بود.',
link1: حاسبه گریتینگ', link1: اژول محاسبات',
link2: 'دانلود نرم افزار' link2: 'دانلود نرم افزار'
} }
}, },
@@ -173,7 +164,7 @@ export const state = () => ({
s6: { s6: {
t1: 'Grating weight calculation software', t1: 'Grating weight calculation software',
t2: "The software designed in this section, by performing accurate calculations, provides weight analysis and grating resistance, using this tool, product selection will be easier for you.", t2: "The software designed in this section, by performing accurate calculations, provides weight analysis and grating resistance, using this tool, product selection will be easier for you.",
link1: 'Grating calculation', link1: 'Calculation Module',
link2: 'Download App' link2: 'Download App'
} }
} }
@@ -183,15 +174,15 @@ export const state = () => ({
hero: 'درباره ما', hero: 'درباره ما',
s1: { s1: {
t1: 'Arak Rail Co.', t1: 'Arak Rail Co.',
t2: 'بیش از 80 سال است که مهندسان و معماران از گریتینگ بعنوان یکی از اصلیترین راهکارها و حتی گاهی تنها راه ممکن، برای پوشش سطوح سود می برند. گریتینگ مجموعه ای از باربرها و رابط ها است که به وسیله جوشکاری ویا پرس به یکدیگر متصل شده و محصولی یکپارچه را تشکیل می دهند.که نهایتا دارای ظرفیت بالایی بار با وزن مرده کم و شفافیت بالا می باشد. اتصال مناسب عناصر باربر و رابط های متقاطع با محیط اطراف باعث می شود تا گریتینگ نه تنها محصولی بسیار پایدار بلکه از نظر بصری نیز جذاب باشد. گستردگی کاربردی این محصول سبب شده است تا در همه جا در صنعت و معماری از گریتینگ استفاده شود. به عنوان یک کفپوش سکوی بسیار سبک و ایمن و در عین حال بسیار سبک و سخت ، استفاده از گریتینگ در تمام زمینه های صنعت سنگین ضروری است.گریتینگ در پالایشگاهها ، نیروگاه ها ، کارخانه های فلزی ، معادن و روی سکوهای نفتی نصب می شود. هر یک از فولادسازان ، فلزکاران و فعالان صنایع سبک و سنگین در صنعت خود نیاز به استفاده از گریتینگ دارند. این محصول همچنین به طور فزاینده ای بیشتر در صنعت لجستیک به عنوان کفپوش و قفسه سکو استفاده می شود.', t2: 'بیش از 80 سال است که مهندسان و معماران از گریتینگ بعنوان یکی از اصلی ترین راهکارها و حتی گاهی تنها راه ممکن، برای پوشش سطوح سود می برند. گریتینگ مجموعه ای از باربرها و رابط ها است که به وسیله جوشکاری و یا پرس به یکدیگر متصل شده و محصولی یکپارچه را تشکیل می دهند که دارای ظرفیت بالای بار با وزن مرده کم می باشد. گستردگی کاربردی این محصول سبب شده است تا در صنایع مختلف، پالایشگاهها ، نیروگاه ها ، کارخانه های فلزی ، معادن و روی سکوهای نفتی از گریتینگ استفاده شود. امروزه استفاده از گریتینگ در تمام زمینه های صنایع سبک و سنگین به عنوان یک کفپوش سکوی بسیار سبک و در عین حال ایمن ، ضروری است.. این محصول همچنین به طور فزاینده ای در صنعت لجستیک به عنوان کفپوش و قفسه سکو استفاده می شود.',
t3: 'شرکت اراك ريل در تاريخ 29/03/1370 با هدف توليد بخشي از قطعات و مجموعه هاي وارداتي مورد مصرف در صنايع ايران به خصوص صنعت راه آهن و شبکه های فلزی (گریتینگ)، با مجوز وزارت صنايع، تاسيس و در مساحتي حدود 6000 متر مربع و با بيش از 1500 متر مربع كارگاه با مجموعه اي از امكانات ماشين كاري , برش كاري , پرس كاري و جوشكاري راه اندازی شد.فلسفه ما شامل تعهد به تحقیق در مورد راه حل های جدید و توسعه مستمر محصولات آن است. در همین راستا شرکت اراک ریل مفتخر است که از سال 1385 برای اولین بار در کشور، با راه اندازی ماشین آلات پیشرفته تولید گریتینگ به روش جوش مقاومتی علاوه بر افزایش ظرفیت، کیفیت محصولات خود را به سطح استانداردهای بین المللی برساند.', t3: 'شرکت اراك ريل در تاريخ 1370/03/29 با هدف توليد بخشي از قطعات و مجموعه هاي وارداتي مورد مصرف در صنايع ايران به خصوص صنعت راه آهن و شبکه های فلزی (گریتینگ)، با مجوز وزارت صنايع، تاسيس و در مساحتي حدود 6000 متر مربع و با بيش از 1500 متر مربع كارگاه با مجموعه اي از امكانات ماشين كاري , برش كاري , پرس كاري و جوشكاري راه اندازی شد.فلسفه ما شامل تعهد به تحقیق در مورد راه حل های جدید و توسعه مستمر محصولات آن است. در همین راستا شرکت اراک ریل مفتخر است که از سال 1385 برای اولین بار در کشور، با راه اندازی ماشین آلات پیشرفته تولید گریتینگ به روش جوش مقاومتی علاوه بر افزایش ظرفیت، کیفیت محصولات خود را به سطح استانداردهای بین المللی برساند.',
t4: 'اراک ریل با اعتقاد به اصل " بی پایان بودن کیفیت" همواره سعی در بالا بردن کیفیت و برآورده کردن نیازهای فنی کارفرمایان را داشته و با پیاده سازی و اجرای سیستمهای کنترلی کیفیت توانسته است گام های موثری برای نیل به این هدف بردارد. استفاده بجا و هدفمند از دانش و تجربه پرسنل و امکانات این شرکت موجب شده است تا نام اراک ریل از بدو تاسیس همواره به عنوان اصلی ترین و با کیفیت ترین تامین کننده گریتینگ پروژهای صنعتی کشور شناخته شود.', t4: 'اراک ریل با اعتقاد به اصل " بی پایان بودن کیفیت" همواره سعی در بالا بردن کیفیت و برآورده کردن نیازهای فنی کارفرمایان را داشته و با پیاده سازی و اجرای سیستمهای کنترلی کیفیت توانسته است گام های موثری برای نیل به این هدف بردارد. استفاده بجا و هدفمند از دانش و تجربه پرسنل و امکانات این شرکت موجب شده است تا نام اراک ریل از بدو تاسیس همواره به عنوان اصلی ترین و با کیفیت ترین تامین کننده گریتینگ پروژه های صنعتی کشور شناخته شود.',
t5: ' گریتینگ های فلزی به دو گروه اصلی گریتینگ الکتروفورج و تسمه در تسمه تقسیم میشوند. مهندسان و محققان ، گریتینگها را برای انواع کاربریها در طیف وسیعی از بارگذاریها استاندارد کرده اند و استفاده گسترده از آنها را ممکن ساخته اند. این محصول بعنوان بادوام ترین ، امن ترین وکاربردی ترین پوشش در بسیاری از محیطها و صنایع کاربرد دارد.وجود فاصله بین باربرها و رابطها، علاوه بر عبور مناسب هوا و نور ، استفاده از محصولی بسیار سبک ، قابل اطمینان ، انعطافپذیر، کاربردی و در عین حال اقتصادی را ممکن ساخته است .' t5: ' گریتینگ های فلزی به دو گروه اصلی گریتینگ الکتروفورج و تسمه در تسمه تقسیم میشوند. مهندسان و محققان ، گریتینگها را برای انواع کاربریها در طیف وسیعی از بارگزاریها استاندارد کرده اند و استفاده گسترده از آنها را ممکن ساخته اند. این محصول بعنوان بادوام ترین ، امن ترین وکاربردی ترین پوشش در بسیاری از محیطها و صنایع کاربرد دارد.وجود فاصله بین باربرها و رابطها، علاوه بر عبور مناسب هوا و نور ، استفاده از محصولی بسیار سبک ، قابل اطمینان ، انعطافپذیر، کاربردی و در عین حال اقتصادی را ممکن ساخته است .'
}, },
s2: { s2: {
t1: 'تاریخچه و افتخارات', t1: 'تاریخچه و افتخارات',
t2: 'تاسیس شرکت', t2: 'تاسیس شرکت',
t3: 'شرکت اراک ریل در سال 1370 با هدف تولید بخشی از قطعات و مجموعه های وارداتی مورد مصرف در صنایع ایران راه اندازی شد. در سالهای اولیه فعالیت همزمان با تولید گریتینگ، تعمیرات اساسی واگن، ساخت تامپون و تعمیرات بوژی جز ضمینه های اصلی کار شرکت بوده است.' t3: 'شرکت اراک ریل در سال 1370 با هدف تولید بخشی از قطعات و مجموعه های وارداتی مورد مصرف در صنایع ایران راه اندازی شد. در سالهای اولیه فعالیت همزمان با تولید گریتینگ، تعمیرات اساسی واگن، ساخت تامپون و تعمیرات بوژی جز زمینه های اصلی کار شرکت بوده است.'
}, },
s3: { s3: {
t1: 'استانداردهای کیفی و تولید:', t1: 'استانداردهای کیفی و تولید:',
@@ -203,26 +194,10 @@ export const state = () => ({
}, },
s4: [ s4: [
{ {
title: 'DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung)', title: 'ANSI-NAMM-MBG 531 (American national standard)',
link: { link: {
txt: 'بیشتر', txt: 'بیشتر',
url: 'https://www.din.de/de' url: '1.ANSI-NAMM-MBG 531 (American national standard).pdf'
},
img: 'din.jpg'
},
{
title: 'RAL-GZ 638 (Quality assurance for gratings)',
link: {
txt: 'بیشتر',
url: 'https://www.astm.org/'
},
img: 'astm.jpg'
},
{
title: 'NSI/NAMM-MBG 531 (American national standard)',
link: {
txt: 'بیشتر',
url: 'https://www.naamm.org/'
}, },
img: 'naamm.jpg' img: 'naamm.jpg'
}, },
@@ -230,9 +205,33 @@ export const state = () => ({
title: 'BS 4592-1 (British standard)', title: 'BS 4592-1 (British standard)',
link: { link: {
txt: 'بیشتر', txt: 'بیشتر',
url: 'https://www.bsigroup.com/' url: '2.BS 4592-1 (British standard).pdf'
}, },
img: 'bsi.jpg' img: 'bsi.jpg'
},
{
title: 'DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung)',
link: {
txt: 'بیشتر',
url: '3.DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung).pdf'
},
img: 'din.jpg'
},
{
title: 'ASTM-A123M 12 (Instruction for Galvanizing)',
link: {
txt: 'بیشتر',
url: '4.ASTM-A123M 12 (Instruction for Galvanizing).pdf'
},
img: 'astm.jpg'
},
{
title: 'RAL-GZ 638 (Quality assurance for gratings)',
link: {
txt: 'بیشتر',
url: '5.RAL-GZ 638 (Quality assurance for gratings).pdf'
},
img: 'pal.jpg'
} }
] ]
}, },
@@ -260,26 +259,10 @@ export const state = () => ({
}, },
s4: [ s4: [
{ {
title: 'DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung)', title: 'ANSI-NAMM-MBG 531 (American national standard)',
link: { link: {
txt: 'More', txt: 'More',
url: 'https://www.din.de/de' url: '1.ANSI-NAMM-MBG 531 (American national standard).pdf'
},
img: 'din.jpg'
},
{
title: 'RAL-GZ 638 (Quality assurance for gratings)',
link: {
txt: 'More',
url: 'https://www.astm.org/'
},
img: 'astm.jpg'
},
{
title: 'NSI/NAMM-MBG 531 (American national standard)',
link: {
txt: 'More',
url: 'https://www.naamm.org/'
}, },
img: 'naamm.jpg' img: 'naamm.jpg'
}, },
@@ -287,9 +270,33 @@ export const state = () => ({
title: 'BS 4592-1 (British standard)', title: 'BS 4592-1 (British standard)',
link: { link: {
txt: 'More', txt: 'More',
url: 'https://www.bsigroup.com/' url: '2.BS 4592-1 (British standard).pdf'
}, },
img: 'bsi.jpg' img: 'bsi.jpg'
},
{
title: 'DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung)',
link: {
txt: 'More',
url: '3.DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung).pdf'
},
img: 'din.jpg'
},
{
title: 'ASTM-A123M 12 (Instruction for Galvanizing)',
link: {
txt: 'More',
url: '4.ASTM-A123M 12 (Instruction for Galvanizing).pdf'
},
img: 'astm.jpg'
},
{
title: 'RAL-GZ 638 (Quality assurance for gratings)',
link: {
txt: 'More',
url: '5.RAL-GZ 638 (Quality assurance for gratings).pdf'
},
img: 'pal.jpg'
} }
] ]
} }
@@ -321,9 +328,9 @@ export const state = () => ({
t22: 'جوشکاری و تکمیل کاری قطعات', t22: 'جوشکاری و تکمیل کاری قطعات',
t23: 'پس از مرحله برش، گریتینگها بر اساس ابعاد و شکل هندسی که دارند با دستگاه جوش مقاومتی فریم و یا با روش GMAW جوشکاری شده و پس از تمیزکاری و سنگزنیهای مورد نیاز توسط بخش کنترل کیفی مورد بازرسی قرار می گیرند.', t23: 'پس از مرحله برش، گریتینگها بر اساس ابعاد و شکل هندسی که دارند با دستگاه جوش مقاومتی فریم و یا با روش GMAW جوشکاری شده و پس از تمیزکاری و سنگزنیهای مورد نیاز توسط بخش کنترل کیفی مورد بازرسی قرار می گیرند.',
t24: 'کنترل کیفی', t24: 'کنترل کیفی',
t25: 'در مرحله بعدی قطعات مطابق با اندازه و درخواست به وسیله اره مخصوص و یا دستگاه CNC برش گریتینگ (تنها نمونه موجود در ایران) برش خورده و آماده ارسال برای مرحله جوشکاری نهایی می گرددaحضور مستمر بخش کنترل کیفی در مراحل مختلف تولید تضمین کننده کیفیت نهایی محصول و اطمینان خاطر مشتری از روند اجرای پروژه می باشد. این مهم در شرکت اراک ریل طبق استانداردهای روز دنیا صورت می پذیرد و در تمامی پروژه مورد تاکید می باشد.', t25: 'حضور مستمر بخش کنترل کیفی در مراحل مختلف تولید تضمین کننده کیفیت نهایی محصول و اطمینان خاطر مشتری از روند اجرای پروژه می باشد. این مهم در شرکت اراک ریل طبق استانداردهای روز دنیا صورت می پذیرد و در تمامی پروژه مورد تاکید می باشد.',
t26: 'گالوانیزه گرم', t26: 'گالوانیزه گرم',
t27: 'بهره گیری از مواد اولیه با کیفیت ، روی با خلوص بالا و فرآیند کنترل شده گالوانیزاسیون همواره جز جدا نشدنی این فرآیند در مجموعه اراک ریل بوده و با توجه به حساسیت بالای این بخش در کیفیت نهایی گریتینگ، با دقت نظر بالای صورت می پذیرد', t27: 'بهره گیری از مواد اولیه با کیفیت ، روی با خلوص بالا و فرآیند کنترل شده گالوانیزاسیون همواره جز جدا نشدنی این فرآیند در مجموعه اراک ریل بوده و با توجه به حساسیت بالای این بخش در کیفیت نهایی گریتینگ، با دقت نظر بالایی صورت می پذیرد',
t28: 'بسته بندی و ارسال', t28: 'بسته بندی و ارسال',
t29: 'پس از انجام کنترلهای نهایی گریتینگ، قطعات مطابق با نیاز مشتری و یا دستور العمل مربوطه، بسته بندی شده و لیست ارسال قطعات تهیه می گردد تا پس از تایید بازرسین و نمایندگان محترم کارفرما قطعات جهت ارسال به سایت کارفرما بارگیری و حمل گردند.' t29: 'پس از انجام کنترلهای نهایی گریتینگ، قطعات مطابق با نیاز مشتری و یا دستور العمل مربوطه، بسته بندی شده و لیست ارسال قطعات تهیه می گردد تا پس از تایید بازرسین و نمایندگان محترم کارفرما قطعات جهت ارسال به سایت کارفرما بارگیری و حمل گردند.'
}, },
@@ -365,7 +372,7 @@ export const state = () => ({
hero: 'محصولات', hero: 'محصولات',
s1: { s1: {
t1: 'محصولات گروه گریتینگ شرکت اراک ریل', t1: 'محصولات گروه گریتینگ شرکت اراک ریل',
t2: 'استفاده از تجهیزات مدرن تولید و تیم مهندسی قوی موجب شده تا شرکت اراک ریل دارای گسترده ترین رنج محصولات گریتینگ را داشته باشد و همچنین ما را قادر می سازد تا در صورت نیاز، محصول را مطابق با نیاز شما طراحی کرده و مطابق با استانداردهای بین اللملی تولید کنیم' t2: 'استفاده از تجهیزات مدرن تولید و تیم مهندسی قوی موجب شده تا شرکت اراک ریل دارای گسترده ترین رنج محصولات گریتینگ باشد و همچنین ما را قادر می سازد تا در صورت نیاز، محصول را مطابق با نیاز شما طراحی کرده و مطابق با استانداردهای بین المللی تولید کنیم'
}, },
s2: { s2: {
t1: 'نوع محصولی را که می خواهید ببینید انتخاب کنید', t1: 'نوع محصولی را که می خواهید ببینید انتخاب کنید',
@@ -400,8 +407,8 @@ export const state = () => ({
}, },
products_details: { products_details: {
fa: { fa: {
hero: 'جزعیات محصول', hero: 'جزئیات محصول',
t1: 'جزییات بیشتر', t1: 'جزئیات بیشتر',
t2: 'نمایش گرافیکی مشخصات', t2: 'نمایش گرافیکی مشخصات',
t3: 'در شماتیک زیر مشخصات اولیه گریتینگ نمایش داده شده است', t3: 'در شماتیک زیر مشخصات اولیه گریتینگ نمایش داده شده است',
t4: 'فایل های قابل دانلود', t4: 'فایل های قابل دانلود',
@@ -481,12 +488,11 @@ export const state = () => ({
contact: { contact: {
fa: { fa: {
hero: 'تماس با ما', hero: 'تماس با ما',
t1: 'اطلاعات مکان و اطلاعات تماس', t1: 'آدرس و اطلاعات تماس',
t2: 'میتوانید از طریق ایمیل با ما تماس بگیرید.', t2: 'میتوانید از طریق ایمیل با ما تماس بگیرید.',
t3: 'استان مرکزی، اراک، شهرک قطب صنعتی، خیابان تلاش، همت',
t4: 'ساعات پاسخگویی:', t4: 'ساعات پاسخگویی:',
t5: 'شنبه تا پنجشنبه صبح از ساعت 9:00 تا 14:00 و بعداز ظهر 15:00 تا 19:00', t5: 'شنبه تا چهارشنبه ساعت 8 تا 15',
t6: 'اگر هر سوالی در رابطه با شرکت گریتینگ اراک ریل دارید می توانید از طریق تلفن یا از طریق ایمیل با ما تماس بگیرید.', t6: 'در صورت داشتن هرگونه سوال میتوانید از طریق تلفن، فکس، ایمیل و یا فرم زیر با ما در ارتباط باشید.',
t7: 'دلیل تماس با شما:', t7: 'دلیل تماس با شما:',
t8: 'نام', t8: 'نام',
t9: 'نام خانوادگی', t9: 'نام خانوادگی',
@@ -494,15 +500,16 @@ export const state = () => ({
t11: 'ایمیل', t11: 'ایمیل',
t12: 'پیام', t12: 'پیام',
t13: 'ارسال', t13: 'ارسال',
t14: 'پیام شما با موفقیت ارسال شد' t14: 'پیام شما با موفقیت ارسال شد',
t15: 'تلفن: ',
t16: 'فکس: '
}, },
en: { en: {
hero: 'Contact Us', hero: 'Contact Us',
t1: 'Location information and contact information', t1: 'Location information and contact information',
t2: 'You can contact us via email.', t2: 'You can contact us via email.',
t3: 'Markazi Province, Arak, Qutb Industrial Town, Talash Street, Hemmat',
t4: 'Response hours:', t4: 'Response hours:',
t5: 'Saturday to Thursday morning from 9:00 to 14:00 and in the afternoon from 15:00 to 19:00', t5: 'Saturday to Wednesday from 8 to 15',
t6: 'If you have any questions about Arak Rail Grating Company, you can contact us by phone or email.', t6: 'If you have any questions about Arak Rail Grating Company, you can contact us by phone or email.',
t7: 'Reason for contacting you:', t7: 'Reason for contacting you:',
t8: 'First Name', t8: 'First Name',
@@ -511,7 +518,9 @@ export const state = () => ({
t11: 'Email', t11: 'Email',
t12: 'Message', t12: 'Message',
t13: 'Send', t13: 'Send',
t14: 'Your message sent successfully' t14: 'Your message sent successfully',
t15: 'Tell: ',
t16: 'Fax: '
} }
}, },
gTech: { gTech: {
@@ -520,7 +529,7 @@ export const state = () => ({
t1: 'تعاریف فنی گریتینگ:', t1: 'تعاریف فنی گریتینگ:',
t2: 'تعاریف فنی گریتینگ به بررسی و تعریف قسمت های گوناگون در ساخت و تولید گریتینگ میپردازد که در زیر به صورت کامل و جامع توضیح داده شده است.', t2: 'تعاریف فنی گریتینگ به بررسی و تعریف قسمت های گوناگون در ساخت و تولید گریتینگ میپردازد که در زیر به صورت کامل و جامع توضیح داده شده است.',
t3: 'تسمه های باربر و یا باربرها (Bearing Bars):', t3: 'تسمه های باربر و یا باربرها (Bearing Bars):',
t4: 'مجموعه اعضای موازی با هم و معمولا با مقطع مستطیل، که وظیفه اصلی تحمل نیرو ناشی از بارگذاری ها را بر عهده دارند و حداقل از دو انتها، به نگهدارنده های مناسب تکیه داده شده اند، باربرهای گریتینگ گویند.', t4: 'مجموعه اعضای موازی با هم و معمولا با مقطع مستطیل، که وظیفه اصلی تحمل نیرو ناشی از بارگزاری ها را بر عهده دارند و حداقل از دو انتها، به نگهدارنده های مناسب تکیه داده شده اند، باربرهای گریتینگ گویند.',
t5: 'رابطها (Cross Bars):', t5: 'رابطها (Cross Bars):',
t6: 'مهمترین وظیفه رابط ها اتصال باربرها به یکدیگر و حفظ یکپارچگی و جلوگیری از کمانش آنهاست لذا نقش تحمل بار بوسیله رابط ها نادیده گرفته میشود.', t6: 'مهمترین وظیفه رابط ها اتصال باربرها به یکدیگر و حفظ یکپارچگی و جلوگیری از کمانش آنهاست لذا نقش تحمل بار بوسیله رابط ها نادیده گرفته میشود.',
t7: 'تسمه فریم (Banding Bars):', t7: 'تسمه فریم (Banding Bars):',
@@ -582,9 +591,9 @@ export const state = () => ({
t2: `بیش از ۸۰ سال است که مهندسان و معماران از گریتینگ بعنوان یکی از اصلی ترین راه کارها و حتی گاهی تنها راه ممکن، برای پوشش سطوح سود می برند. گریتینگ مجموعه ای از باربرها و رابط ها است که به وسیله جوشکاری و یا پرس به یکدیگر متصل شده و محصولی یکپارچه را تشکیل می دهند. در خصوص اجزای مهم گریتینگ و پارامترهای طراحی به قسمت t2: `بیش از ۸۰ سال است که مهندسان و معماران از گریتینگ بعنوان یکی از اصلی ترین راه کارها و حتی گاهی تنها راه ممکن، برای پوشش سطوح سود می برند. گریتینگ مجموعه ای از باربرها و رابط ها است که به وسیله جوشکاری و یا پرس به یکدیگر متصل شده و محصولی یکپارچه را تشکیل می دهند. در خصوص اجزای مهم گریتینگ و پارامترهای طراحی به قسمت
<a href="/fa/tech/gTech" target="_blank">اطلاعات فنی گریتینگ</a> <a href="/fa/tech/gTech" target="_blank">اطلاعات فنی گریتینگ</a>
مراجعه کنید.`, مراجعه کنید.`,
t3: 'گریتینگ های فلزی به دو گروه اصلی گریتینگ الکتروفورج و گریتینگ تسمه در تسمه تقسیم می شوند. مهندسان و محققان ، گریتینگ ها را برای انواع کاربرد ها در طیف وسیعی از بارگذاری ها استاندارد کرده اند و استفاده گسترده از آنها را ممکن ساخته اند. این محصول بعنوان بادوام ترین ، امن ترین و کاربردی ترین پوشش در بسیاری از محیطها و صنایع کاربرد دارد.', t3: 'گریتینگ های فلزی به دو گروه اصلی گریتینگ الکتروفورج و گریتینگ تسمه در تسمه تقسیم می شوند. مهندسان و محققان ، گریتینگ ها را برای انواع کاربرد ها در طیف وسیعی از بارگزاری ها استاندارد کرده اند و استفاده گسترده از آنها را ممکن ساخته اند. این محصول بعنوان بادوام ترین ، امن ترین و کاربردی ترین پوشش در بسیاری از محیطها و صنایع کاربرد دارد.',
t4: 'وجود فاصله بین باربرها و رابط ها، علاوه بر عبور مناسب هوا و نور ، استفاده از محصولی بسیار سبک ، قابل اطمینان ، انعطافپذیر، کاربردی و در عین حال اقتصادی را ممکن ساخته است که تمامی این موارد باعث افزایش کاربرد گریتینگ شده است.', t4: 'وجود فاصله بین باربرها و رابط ها، علاوه بر عبور مناسب هوا و نور ، استفاده از محصولی بسیار سبک ، قابل اطمینان ، انعطافپذیر، کاربردی و در عین حال اقتصادی را ممکن ساخته است که تمامی این موارد باعث افزایش کاربرد گریتینگ شده است.',
t5: 'کف پوش، پرچین و حصار محافظ، راهروها، رمپ های نفر رو و ماشین رو، درپوش جویها، کانالها، حوضچه ها، پله های اضطراری و صنعتی و یا با کاربریهای خاص، پارتیشن بندی و لایه بندی طبقات، فریم محافظ فلزی، شبکه های محافظ تجهیزات، انبارها و تاسیسات سردخانه ای، تقویت کف پوشها، تکیه گاه تجهیزات صنعتی و … تنها بخشی از کاربرد گریتینگ است که گریتینگ در صنایع مختلف دارد . صنایعی چون :', t5: 'کف پوش، پرچین و حصار محافظ، راهروها، رمپ های نفر رو و ماشین رو، درپوش جویها، کانالها، حوضچه ها، پله های اضطراری و صنعتی و یا با کاربریهای خاص، پارتیشن بندی و لایه بندی طبقات، فریم محافظ فلزی، شبکه های محافظ تجهیزات، انبارها و تاسیسات سردخانه ای، تقویت کف پوشها، تکیه گاه تجهیزات صنعتی و … تنها بخشی از کاربرد گریتینگ است. از دیگر کاربردهای گریتینگ میتوان به موارد زیر اشاره کرد :',
t6: 'صنایع نفت و گاز و پتروشیمی (پالایشگاهها، واحدهای پتروشیمی، سکوهای نفتی و ...)', t6: 'صنایع نفت و گاز و پتروشیمی (پالایشگاهها، واحدهای پتروشیمی، سکوهای نفتی و ...)',
t7: 'تاسیسات شهری (پلکان، رمپ و پلها)', t7: 'تاسیسات شهری (پلکان، رمپ و پلها)',
t8: 'نیروگاه های آبی و گازی و ...', t8: 'نیروگاه های آبی و گازی و ...',
@@ -595,7 +604,8 @@ export const state = () => ({
t13: 'تاسیسات آبی و تصفیه خانه ها', t13: 'تاسیسات آبی و تصفیه خانه ها',
t14: 'صنعت خودروسازی و ماشین سازی', t14: 'صنعت خودروسازی و ماشین سازی',
t15: 'مشاهده لیست محصولات اراک ریل', t15: 'مشاهده لیست محصولات اراک ریل',
t16: 'محصولات' t16: 'محصولات',
t17: 'تصاویری از کاربرد گریتینگ:'
}, },
en: { en: {
title: 'Grating Usage', title: 'Grating Usage',
@@ -616,14 +626,15 @@ export const state = () => ({
t13: 'Water facilities and treatment plants', t13: 'Water facilities and treatment plants',
t14: 'Automotive and machine industry', t14: 'Automotive and machine industry',
t15: 'View the list of ArakRail products', t15: 'View the list of ArakRail products',
t16: 'Products' t16: 'Products',
t17: 'Pictures of grating usages:'
} }
}, },
gStandard: { gStandard: {
fa: { fa: {
title: 'استاندارد گریتینگ', title: 'استاندارد گریتینگ',
t1: 'استاندارد گریتینگ:', t1: 'استاندارد گریتینگ:',
t2: 'گریتینگ ها نیز مانند هر محصول تولیدی دیگری نیازمند استانداردهای خاص خود می باشد تا محصول تولیدی دارای بالاترین کیفیت از تمامی لحاظ باشد در زیر در خصوص استاندارد گریتینگ توضیحاتی را قرار داده ایم.', t2: 'گریتینگ ها نیز مانند هر محصول تولیدی دیگری نیازمند استانداردهای خاص خود می باشد تا محصول تولیدی از هر لحاظ دارای بالاترین کیفیت باشد. در زیر در خصوص استاندارد گریتینگ توضیحاتی را قرار داده ایم.',
t3: 'طول های استاندارد گریتینگ:', t3: 'طول های استاندارد گریتینگ:',
t4: 'متداول ترین ابعاد استاندارد گریتینگ ها ۱۰۰۰*۳۰۰۰ و ۱۰۰۰*۶۰۰۰ میلیمتر می باشد که برای گریتینگ ها با پوشش گالوانیزه این ابعاد نباید از ۱۰۰۰*۳۰۰۰ میلی متر تجاوز کند. سایر ابعاد و اندازه ها مطابق با نقشه های کارگاهی قابل ساخت است .', t4: 'متداول ترین ابعاد استاندارد گریتینگ ها ۱۰۰۰*۳۰۰۰ و ۱۰۰۰*۶۰۰۰ میلیمتر می باشد که برای گریتینگ ها با پوشش گالوانیزه این ابعاد نباید از ۱۰۰۰*۳۰۰۰ میلی متر تجاوز کند. سایر ابعاد و اندازه ها مطابق با نقشه های کارگاهی قابل ساخت است .',
t5: 'به دلیل خطاهای اجتناب ناپذیر تولید در گریتینگ های دستی معمولا این گریتینگ ها با طول بیش از ۱۵۰۰ میلیمتر تولید نمی شوند.', t5: 'به دلیل خطاهای اجتناب ناپذیر تولید در گریتینگ های دستی معمولا این گریتینگ ها با طول بیش از ۱۵۰۰ میلیمتر تولید نمی شوند.',
@@ -635,11 +646,6 @@ export const state = () => ({
t11: 'جمع آوری تجربیات و رویکردهای مناسب، به منظور حصول بهترین نتیجه و جلوگیری از تکرار اشتباهات در استانداردها خلاصه شده اند .', t11: 'جمع آوری تجربیات و رویکردهای مناسب، به منظور حصول بهترین نتیجه و جلوگیری از تکرار اشتباهات در استانداردها خلاصه شده اند .',
t12: 'شرکت اراک ریل با به کارگیری استانداردها و دستورالعمل های تولید گریتینگ ، سعی در برآوردن انتظارات و خواسته های کارفرمایان داشته و توانسته ، محصولی با کیفیت و مطابق با استانداردهای روز دنیا به صنعت کشور ارائه دهد .', t12: 'شرکت اراک ریل با به کارگیری استانداردها و دستورالعمل های تولید گریتینگ ، سعی در برآوردن انتظارات و خواسته های کارفرمایان داشته و توانسته ، محصولی با کیفیت و مطابق با استانداردهای روز دنیا به صنعت کشور ارائه دهد .',
t13: 'محصولات این مجموعه بر اساس استانداردهای زیر تولید و کنترل می شوند:', t13: 'محصولات این مجموعه بر اساس استانداردهای زیر تولید و کنترل می شوند:',
t14: 'NSI/NAMM-MBG 531 (American national standard)',
t15: 'BS 4592-1 (British standard)',
t16: 'DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung)',
t17: 'BGI 588 (Instruction sheet for gratings)',
t18: 'RAL-GZ 638 (Quality assurance for gratings)',
t19: 'مشاهده لیست محصولات اراک ریل', t19: 'مشاهده لیست محصولات اراک ریل',
t20: 'محصولات' t20: 'محصولات'
}, },
@@ -658,11 +664,6 @@ export const state = () => ({
t11: 'Gathering appropriate experiences and approaches are summarized in order to achieve the best results and avoid repeating mistakes in the standards.', t11: 'Gathering appropriate experiences and approaches are summarized in order to achieve the best results and avoid repeating mistakes in the standards.',
t12: 'Arak Rail Company, by applying the standards and instructions for the production of grating, has tried to meet the expectations and demands of employers and has been able to offer quality products in accordance with current world standards to the country\'s industry.', t12: 'Arak Rail Company, by applying the standards and instructions for the production of grating, has tried to meet the expectations and demands of employers and has been able to offer quality products in accordance with current world standards to the country\'s industry.',
t13: 'The products of this collection are produced and controlled according to the following standards:', t13: 'The products of this collection are produced and controlled according to the following standards:',
t14: 'NSI/NAMM-MBG 531 (American national standard)',
t15: 'BS 4592-1 (British standard)',
t16: 'DIN 24531-1 & DIN 24537-1 (Deutsches Institut für Normung)',
t17: 'BGI 588 (Instruction sheet for gratings)',
t18: 'RAL-GZ 638 (Quality assurance for gratings)',
t19: 'View the list of ArakRail products', t19: 'View the list of ArakRail products',
t20: 'Products' t20: 'Products'
} }
@@ -677,8 +678,8 @@ export const state = () => ({
قابل مشاهده است).`, قابل مشاهده است).`,
t4: 'همانطور که اشاره شد نحوه تولید و نوع تولید گریتینگ ها به وسیله کارشناسان این امر صورت میپذیرد تا نهایتا گریتینگ تولید شده از نظر کارایی و کیفیت و همچنین شکل ظاهری در سطح استاندارد بوده و نیاز مشتریان را به طور کامل برطرف سازد. که با توجه به گوناگونی گریتینگ ها و مواد اولیه گوناگون در ساخت گریتینگ ممکن است فاکتورهای مورد استفاده در طراحی گریتینگ که در بالا به آن اشاره نمودیم برخی فاکتورهای دیگر نیز اضافه شوند.', t4: 'همانطور که اشاره شد نحوه تولید و نوع تولید گریتینگ ها به وسیله کارشناسان این امر صورت میپذیرد تا نهایتا گریتینگ تولید شده از نظر کارایی و کیفیت و همچنین شکل ظاهری در سطح استاندارد بوده و نیاز مشتریان را به طور کامل برطرف سازد. که با توجه به گوناگونی گریتینگ ها و مواد اولیه گوناگون در ساخت گریتینگ ممکن است فاکتورهای مورد استفاده در طراحی گریتینگ که در بالا به آن اشاره نمودیم برخی فاکتورهای دیگر نیز اضافه شوند.',
t5: 'شما عزیزان میتوانید در صورت داشتن هرگونه سوالی در خصوص گریتینگ و یا سفارش گریتینگ مورد نظر خود با کارشناسان ما تماس حاصل نمایید.', t5: 'شما عزیزان میتوانید در صورت داشتن هرگونه سوالی در خصوص گریتینگ و یا سفارش گریتینگ مورد نظر خود با کارشناسان ما تماس حاصل نمایید.',
t6: 'مشاهده لیست محصولات اراک ریل', t6: 'نرم افزار محاسبه وزن گریتینگ',
t7: حصولات' t7: اژول محاسبات'
}, },
en: { en: {
title: 'Grating Design', title: 'Grating Design',
@@ -689,15 +690,214 @@ export const state = () => ({
Is visible) .`, Is visible) .`,
t4: 'As it was mentioned, the production method and type of gratings are done by experts in order to finally produce the gratings in terms of efficiency and quality, as well as the appearance at the standard level and completely meet the needs of customers. Due to the variety of gratings and different raw materials in the manufacture of gratings, the factors used in the design of gratings, which we mentioned above, some other factors may be added.', t4: 'As it was mentioned, the production method and type of gratings are done by experts in order to finally produce the gratings in terms of efficiency and quality, as well as the appearance at the standard level and completely meet the needs of customers. Due to the variety of gratings and different raw materials in the manufacture of gratings, the factors used in the design of gratings, which we mentioned above, some other factors may be added.',
t5: 'Dear ones, if you have any questions about grating or ordering the grating you want, you can contact our experts.', t5: 'Dear ones, if you have any questions about grating or ordering the grating you want, you can contact our experts.',
t6: 'View the list of ArakRail products', t6: 'Grating weight calculation software',
t7: 'Products' t7: 'Calculation Module'
} }
}, },
calculation: { calculation: {
fa: {}, fa: {
en: {} hero: 'نرم افزار محاسبه',
scrollToSee: '*برای مشاهده جدول به صورت کامل اسکرول افقی کنید.',
app: {
enter: 'وارد کنید',
select: 'انتخاب کنید',
calculate: 'محاسبه',
waiting: 'لطفا منتظر بمانید...',
validationErr: 'پارامترها رو بررسی کنید',
t1: 'وزن گریتینگ',
t2: 'بدلیل این که وزن گریتینگ ها به واسطه مواردی همچون مشخصات فنی یا همان دیتیل ساخت از جمله نوع گریتینگ،جنس تسمه و اندازه چشمه ها متغیر است،بدین منظور جهت راحتی و سهولت در انجام کار شما مشتری گرامی، شرکت اراک ریل نرم افزار محاسبه وزن و میزان بار قابل تحمل را برای گریتینگ طراحی و در این صفحه قرار داده است.که با داشتن مشخصات فنی گریتینگ مورد نظر خود می‌توانید وزن گریتینگ خود را همراه با گالوانیزه و یا بدون گالوانیزه محاسبه کنید.',
t3: 'ظرفیت بارگیری گریتینگ خود را محاسبه کنید',
t4: 'روش محاسبه',
t5: 'استفاده از کلاس ها',
t6: 'وارد کردن دستی',
t7: 'انتخاب کلاس لودینگ',
t8: 'عابر پیاده:',
t9: 'کلاس 1',
t10: 'وسایل نقلیه:',
t11: 'کلاس 2',
t12: 'کلاس 3',
t13: 'کلاس 4',
t14: 'لیفتراک:',
t15: 'اطلاعات ورودی',
t16: 'نوع گریتینگ',
t17: 'الکتروفورج',
t18: 'پرسی',
t19: 'نوع فشار',
t20: 'بار متمرکز',
t21: 'بار گسترده',
t22: 'بار متمرکز (kn)',
t23: 'بار گسترده (kn/m2)',
t24: 'گام تسمه های باربر (mm)',
t25: 'گام تسمه های رابط (mm)',
t26: 'دهنه باربر (mm)',
t27: 'ضخامت تسمه های باربر (mm)',
t28: 'ارتفاع تسمه های باربر (mm)',
t29: 'ابتدا گام تسمه رابط را انتخاب کنید'
}, },
calc_app_link: '' table1: {
title: 'کلاس های مختلف بارگزاری (UNI 11002/2009)',
load: 'مقدار بار',
imprint: 'سطح موثر بار',
class1: {
t1: 'کلاس 1',
t2: '(DM 14-01-2008 - 3.1.4) عابر پیاده',
t3: 'جمعیت جمع و جور',
},
class2: {
t1: 'کلاس 2',
t2: '(DM 14-01-2008 - 3.1.4) وسیله نقلیه سبک',
t3: 'وزن کل 3000 کیلوگرم'
},
class3: {
t1: 'کلاس 3',
t2: 'کامیونت',
t3: 'وزن کل 6000 کیلوگرم'
},
class4: {
t1: 'کلاس 4',
t2: '(ROAD CODE ART . 62-5) کامیون حمل بار (ماشین آتشنشانی)',
t3: 'وزن کل 45000 کیلوگرم'
},
danSqm: 'daN / sqm',
danImprint: 'daN / سطح موثر بار'
},
table2: {
title: '(EUROCODE UNI-EN 1991/2004) تیپهای مختلف لیفتراک بر اساس ظرفیت باربری',
load: 'مقدار بار',
imprint: 'سطح موثر بار',
danImprint: 'daN / سطح موثر بار',
t1: 'تیپ',
t2: 'KN بدون بار',
t3: 'KN مقدار بار',
t4: 'KN جمع کل',
fl1: {
t1: 'لیفتراک',
t2: 'FL1'
},
fl2: {
t1: 'لیفتراک',
t2: 'FL2'
},
fl3: {
t1: 'لیفتراک',
t2: 'FL3'
},
fl4: {
t1: 'لیفتراک',
t2: 'FL4'
},
fl5: {
t1: 'لیفتراک',
t2: 'FL5'
},
fl6: {
t1: 'لیفتراک',
t2: 'FL6'
}
}
},
en: {
hero: 'Calculation Application',
scrollToSee: '*Scroll horizontally to view the full table.',
app: {
enter: 'enter',
select: 'select',
calculate: 'Calculate',
waiting: 'Please Wait...',
validationErr: 'Check parameters',
t1: 'Grating weight',
t2: 'Due to the fact that the weight of the gratings varies due to items such as technical specifications or construction details such as the type of grating, the type of belt and the size of the springs, for the convenience and ease of your work, dear customer, Arak Rail Company And has designed the amount of tolerable load for the grating and placed it on this page. Having the technical specifications of the grating you want, you can calculate the weight of your grating with or without galvanizing.',
t3: 'Calculate the loading capacity of your grating',
t4: 'Calculation Method',
t5: 'Classified Entry',
t6: 'Custom Entry',
t7: 'Select the loading class',
t8: 'Pedestrian:',
t9: 'Class 1',
t10: 'Vehicles:',
t11: 'Class 2',
t12: 'Class 3',
t13: 'Class 4',
t14: 'Forklift:',
t15: 'Data Entry',
t16: 'Type of grating',
t17: 'Forge-Welded',
t18: 'Pressured',
t19: 'Load Type',
t20: 'Pointed Load',
t21: 'Distributed Load',
t22: 'Pointed Load (kn)',
t23: 'Distributed Load (kn/m2)',
t24: 'Bearing Bar Pitch (mm)',
t25: 'Cross Bar Pitch (mm)',
t26: 'Clear Span (mm)',
t27: 'Bearing Bar Thickness (mm)',
t28: 'Bearing Bar Height (mm)',
t29: 'First select Cross Bar Pitch'
},
table1: {
title: 'TYPES OF LOADING CLASS UNI 11002/2009',
load: 'LOAD',
imprint: 'IMPRINT',
class1: {
t1: 'CLASS 1',
t2: 'PEDESTRIAN (DM 14-01-2008 - 3.1.4)',
t3: 'Compact Crowd',
},
class2: {
t1: 'CLASS 2',
t2: 'VEHICLE (DM 14-01-2008 - 3.1.4)',
t3: 'Total weight 3000 kg'
},
class3: {
t1: 'CLASS 3',
t2: 'LIGHT TRUCK',
t3: 'Total weight 6000 Kg'
},
class4: {
t1: 'CLASS 4',
t2: 'HEAVY TRUCK (Firefighters) (ROAD CODE ART . 62-5)',
t3: 'Total weight 45000 kg'
},
danSqm: 'daN / sqm',
danImprint: 'daN / Imprint'
},
table2: {
title: 'TYPES OF CAPACITY FORKLIFT EUROCODE UNI-EN 1991/2004',
load: 'LOAD',
imprint: 'IMPRINT',
danImprint: 'daN / Imprint',
t1: 'Type',
t2: 'Empty weight KN',
t3: 'Load KN',
t4: 'Total KN',
fl1: {
t1: 'FORKLIFT FL1',
t2: 'FL1'
},
fl2: {
t1: 'FORKLIFT FL2',
t2: 'FL2'
},
fl3: {
t1: 'FORKLIFT FL3',
t2: 'FL3'
},
fl4: {
t1: 'FORKLIFT FL4',
t2: 'FL4'
},
fl5: {
t1: 'FORKLIFT FL5',
t2: 'FL5'
},
fl6: {
t1: 'FORKLIFT FL6',
t2: 'FL6'
}
}
}
}
}) })
export const mutations = {} export const mutations = {}