Merge branch 'fix_foton_20240408' into 'master'

Fix foton 20240408

See merge request laws-foton-slrs/foton-laws-system-front!177
This commit is contained in:
王晓勇
2024-04-16 09:36:37 +00:00
4 changed files with 240 additions and 41 deletions
@@ -94,6 +94,10 @@ export default {
required:{ required:{
type:Boolean, type:Boolean,
default:false default:false
},
naButton:{
type:Boolean,
default:false
} }
}, },
components: {}, components: {},
@@ -144,7 +148,16 @@ export default {
return { return {
disabledDate (time) { disabledDate (time) {
return _this.tagList.includes(_this.$dateFormat(time, 'yyyy-MM-dd')) return _this.tagList.includes(_this.$dateFormat(time, 'yyyy-MM-dd'))
} },
shortcuts:_this.naButton ? [{
text: 'N/A',
onClick() {
_this.tagList.push('N/A')
_this.datePickerVisible = false
_this.datePickerVal = ''
_this.$emit('input', _this.tagList.join(','))
}
}] : null
} }
} }
}, },
@@ -298,9 +298,11 @@
<p class="half"><label style=" margin-right: 150px;">发布日期</label><span>{{ sarStandardsInfoEO.issueTime || '-' }}</span> <p class="half"><label style=" margin-right: 150px;">发布日期</label><span>{{ sarStandardsInfoEO.issueTime || '-' }}</span>
</p> </p>
<p class="half"><label style=" margin-right: 150px;">标准体系</label><span>{{ <p class="half"><label style=" margin-right: 150px;">标准体系</label>
sarStandardsInfoEO.standSystem || '-' <el-tooltip class="item" effect="dark" :content="sarStandardsInfoEO.standSystem" placement="top">
}}</span></p> <span>{{sarStandardsInfoEO.standSystem | ellipsis20 }}</span>
</el-tooltip>
</p>
<p class="half"> <p class="half">
<label style=" margin-right: 84px;">是否纳入认证清单</label> <label style=" margin-right: 84px;">是否纳入认证清单</label>
<span> <span>
@@ -582,8 +584,10 @@
<template v-if="child.attrField === 'XGD' || child.attrField === 'FBGBJBD' || child.attrField === 'BPG' <template v-if="child.attrField === 'XGD' || child.attrField === 'FBGBJBD' || child.attrField === 'BPG'
|| child.attrField === 'SSG'|| child.attrField === 'ZQYJG'|| child.attrField === 'CA' || child.attrField === 'SSG'|| child.attrField === 'ZQYJG'|| child.attrField === 'CA'
|| child.attrField === 'JDWJ' || child.attrField === 'GLWJ'"> || child.attrField === 'JDWJ' || child.attrField === 'GLWJ'">
<a :title="file.oldFileName" target="_blank" <a v-if="$route.params.pageType === 'INLAND_STAND'" :title="file.oldFileName" target="_blank" style=" width: 200px"
@click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName | ellipsis }}</a> @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName}}</a>
<a v-else :title="file.oldFileName" target="_blank"
@click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName}}</a>
<i <i
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'"
class="icon-download" class="icon-download"
@@ -598,8 +602,10 @@
/> />
</template> </template>
<template v-else> <template v-else>
<a :title="file.oldFileName" target="_blank" <a v-if="$route.params.pageType === 'INLAND_STAND'" :title="file.oldFileName" target="_blank" style=" width: 200px"
@click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName | ellipsis }}</a> @click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName}}</a>
<a v-else :title="file.oldFileName" target="_blank"
@click="openFileInPdf(file.id, file.oldFileName)">{{ file.oldFileName}}</a>
<i <i
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : 'a772afab2a6708883335500f3f86e771'"
class="icon-download" class="icon-download"
@@ -1842,8 +1848,18 @@ export default {
RelatedTermsSelect RelatedTermsSelect
}, },
filters: { filters: {
ellipsis20(value) {
if (!value) return ''
if (value.length > 20) {
return value.slice(0, 20) + '...'
}
return value
},
ellipsis(value) { ellipsis(value) {
if (!value) return '' if (!value) return ''
if (value.length > 12) {
return value.slice(0, 12) + '...'
}
return value return value
}, },
ellipsis50(value) { ellipsis50(value) {
@@ -1026,17 +1026,28 @@
<el-select <el-select
v-model="form.gkdw" v-model="form.gkdw"
:popper-append-to-body="false" :popper-append-to-body="false"
style="width: 82%;"
filterable filterable
clearable clearable
placeholder="请选择归口管理部门" placeholder="请选择归口管理部门"
> >
<el-option v-for="item in gkglbmOptions" :key="item.value" :value="item.value" :label="item.label" /> <el-option v-for="item in gkglbmOptions" :key="item.value" :value="item.value" :label="item.label" />
</el-select> </el-select>
<el-button
class="common-button-primary add-button"
type="primary"
icon="add"
size="small"
@click="productAddGk"
>
维护
</el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="form.standInData === '0'" label="起草单位" prop="qcdw" class="add-form-item form-item-disabled"> <el-form-item v-if="form.standInData === '0'" label="起草单位" prop="qcdw" class="add-form-item form-item-disabled">
<el-select <el-select
v-model="form.qcdw" v-model="form.qcdw"
clearable clearable
style="width: 82%;"
placeholder="请选择起草单位" placeholder="请选择起草单位"
multiple multiple
filterable filterable
@@ -1049,6 +1060,15 @@
:label="item.label" :label="item.label"
/> />
</el-select> </el-select>
<el-button
class="common-button-primary add-button"
type="primary"
icon="add"
size="small"
@click="productAdd"
>
维护
</el-button>
</el-form-item> </el-form-item>
<!--<el-form-item v-if="form.standInData === '0'" label="体系类别" prop="txlb" class="add-form-item form-item-disabled"> <!--<el-form-item v-if="form.standInData === '0'" label="体系类别" prop="txlb" class="add-form-item form-item-disabled">
<el-select v-model="form.txlb" placeholder="请选择体系类别" multiple> <el-select v-model="form.txlb" placeholder="请选择体系类别" multiple>
@@ -1775,6 +1795,69 @@
@checkedRole="checkedRole2" @checkedRole="checkedRole2"
/> />
<loading :loading="ccc">加载数据</loading> <loading :loading="ccc">加载数据</loading>
<el-drawer
:wrapperClosable="false"
:title="productTitle"
:visible.sync="productModal"
size="800px"
:before-close="closeDrawerProductModelAdd"
label-width="130px"
>
<div class="demo-drawer-content">
<el-form
ref="productModelAdd"
:model="productModelAdd"
:rules="productRules"
class="label-input-form"
label-width="130px"
>
<el-row>
<el-col>
<el-form-item label="选项" prop="dicTypeName" class="add-form-item">
<el-input v-model.trim="productModelAdd.dicTypeName" placeholder="请输入选项" clearable />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="排序号" prop="showIndex" class="add-form-item">
<el-input
v-model.number="productModelAdd.showIndex"
number
placeholder="请输入排序号"
:maxlength="4"
clearable
/>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="描述" prop="describes" class="add-form-item">
<el-input
v-model.trim="productModelAdd.describes"
placeholder="请输入描述"
clearable
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="saveProduct('productModelAdd')"
>
提交
</el-button>
<el-button
class="common-button-default"
icon="el-icon-close"
@click="closeModal"
>
取消
</el-button>
</div>
</el-drawer>
</div> </div>
</template> </template>
@@ -1814,7 +1897,42 @@ export default {
TreeSelectNew TreeSelectNew
}, },
data () { data () {
const validStandNumInCompile2 = (rule, value, callback) => {
// let pattern = /^\d+$/
const pattern = /^[1-9]\d*$/
setTimeout(() => {
if (!pattern.test(value)) {
return callback(new Error('仅能输入正整数'))
} else {
callback()
}
})
}
return { return {
productTitle: '',
productModal: false,
productModelAdd: {
// 模态框信息
dicTypeName: '',
showIndex: '',
// 描述
describes: '',
// 唯一辨识
dicId: '' // 写死 数据字段ID
},
productRules: {
dicTypeName: [
{ required: true, message: '选项不能为空', trigger: 'blur' },
{ type: 'string', max: 100, message: '最多输入100位', trigger: 'blur' }
],
showIndex: [
{ type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur' },
{ type: 'string', validator: validStandNumInCompile2, trigger: 'blur' }
],
describes: [
{ type: 'string', max: 500, message: '最多输入500位', trigger: 'blur' }
]
},
openModifyFileNameDialog: false, openModifyFileNameDialog: false,
modifyFile: { modifyFile: {
fileName: '', fileName: '',
@@ -2147,6 +2265,66 @@ export default {
this.modelFunc() this.modelFunc()
}, },
methods: { methods: {
productAdd () {
this.productModal = true
this.productTitle = '维护起草单位'
this.productModelAdd.dicTypeCode = ''
},
closeModal () {
this.productModal = false
this.closeDrawerProductModelAdd()
},
saveProduct (name) {
this.$refs[name].validate((valid) => {
if (valid) {
if(this.productTitle == '维护归口管理部门') {
this.productModelAdd.dicId = 'DNDYWNSJKH4H8LYTV2CJ'
} else if(this.productTitle == '维护起草单位') {
this.productModelAdd.dicId = '4upkjyo34koluwmld5us'
}
this.$http.postData('sys/dictype/create', this.productModelAdd, {
_this: this
}, res => {
if (res.ok) {
this.getDataAsync()
this.productModal = false
this.productModelAdd = {
// 模态框信息
dicTypeName: '',
showIndex: '',
// 描述
describes: '',
// 唯一辨识
dicId: '4upkjyo34koluwmld5us'
}
} else {
this.productModal = true
}
}, e => {})
} else {
}
})
},
closeDrawerProductModelAdd () {
this.$nextTick(() => {
this.$refs['productModelAdd'].resetFields()
this.productModelAdd = {
// 模态框信息
dicTypeName: '',
showIndex: '',
// 描述
describes: '',
// 唯一辨识
dicId: '4upkjyo34koluwmld5us'
}
})
this.productModal = false
},
productAddGk () {
this.productModal = true
this.productTitle = '维护归口管理部门'
this.productModelAdd.dicTypeCode = ''
},
handleRemoveFile (file) { handleRemoveFile (file) {
const fileList = [] const fileList = []
this.fileList.forEach(item => { this.fileList.forEach(item => {
@@ -478,31 +478,30 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准实施日期" prop="putTime"> <el-form-item label="标准实施日期" prop="putTime">
<el-date-picker <custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.ssrq" :config="{attrName: '',attrField: 'ssrq'}" :naButton=true>
clearable </custom-date-pick-group>
v-model.trim="editRowData.ssrq"
type="dates"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="在产车实施日期" prop="zccssrqgj"> <el-form-item label="在产车实施日期" prop="zccssrqgj">
<el-date-picker <!-- <el-date-picker
clearable clearable
v-model.trim="editRowData.zccssrqgj" v-model.trim="editRowData.zccssrqgj"
type="dates" type="dates"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>-->
<custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.zccssrqgj" :config="{attrName: '',attrField: 'zccssrqgj'}" :naButton=true>
</custom-date-pick-group>
</el-form-item> </el-form-item>
<el-form-item label="新车型实施日期" prop="xcxssrqgj"> <el-form-item label="新车型实施日期" prop="xcxssrqgj">
<el-date-picker <!-- <el-date-picker-->
clearable <!-- clearable-->
v-model.trim="editRowData.xcxssrqgj" <!-- v-model.trim=""-->
type="dates" <!-- type="dates"-->
value-format="yyyy-MM-dd" <!-- value-format="yyyy-MM-dd"-->
placeholder="选择日期"> <!-- placeholder="选择日期">-->
</el-date-picker> <!-- </el-date-picker>-->
<custom-date-pick-group class="customDataPicker" style="margin-left: 0px" v-model="editRowData.xcxssrqgj" :config="{attrName: '',attrField: 'xcxssrqgj'}" :naButton=true>
</custom-date-pick-group>
</el-form-item> </el-form-item>
<el-form-item label="责任部门" prop="zrbm"> <el-form-item label="责任部门" prop="zrbm">
<el-input v-model.trim="editRowData.zrbm" disabled/> <el-input v-model.trim="editRowData.zrbm" disabled/>
@@ -1570,18 +1569,12 @@ export default {
} }
if (this.editRowData.ssrq === "-") { if (this.editRowData.ssrq === "-") {
this.editRowData.ssrq = ""; this.editRowData.ssrq = "";
} else if (this.editRowData.ssrq&& this.editRowData.ssrq !== "-" ) {
this.editRowData.ssrq = this.editRowData.ssrq.split(",");
} }
if (this.editRowData.zccssrqgj === "-") { if (this.editRowData.zccssrqgj === "-") {
this.editRowData.zccssrqgj = ""; this.editRowData.zccssrqgj = "";
} else if (this.editRowData.zccssrqgj && this.editRowData.zccssrqgj !== "-") {
this.editRowData.zccssrqgj = this.editRowData.zccssrqgj.split(",");
} }
if (this.editRowData.xcxssrqgj === "-") { if (this.editRowData.xcxssrqgj === "-") {
this.editRowData.xcxssrqgj = ""; this.editRowData.xcxssrqgj = "";
} else if (this.editRowData.xcxssrqgj && this.editRowData.xcxssrqgj !== "-") {
this.editRowData.xcxssrqgj = this.editRowData.xcxssrqgj.split(",");
} }
this.drawerEdit = true; this.drawerEdit = true;
}, },
@@ -1599,15 +1592,6 @@ export default {
if(this.editRowData.syrz){ if(this.editRowData.syrz){
this.editRowData.syrz = this.editRowData.syrz.join(',') this.editRowData.syrz = this.editRowData.syrz.join(',')
} }
if (this.editRowData.ssrq !== '' && this.editRowData.ssrq !== null) {
this.editRowData.ssrq = this.editRowData.ssrq.join(',')
}
if (this.editRowData.xcxssrqgj !== '' && this.editRowData.xcxssrqgj !== null) {
this.editRowData.xcxssrqgj = this.editRowData.xcxssrqgj.join(',')
}
if (this.editRowData.zccssrqgj !== '' && this.editRowData.zccssrqgj !== null) {
this.editRowData.zccssrqgj = this.editRowData.zccssrqgj.join(',')
}
this.drawerEdit = false this.drawerEdit = false
}, },
// 点击清单条目导入按钮事件 // 点击清单条目导入按钮事件
@@ -1707,8 +1691,9 @@ export default {
sarAccessEO.reNewPeople = this.$store.getters.userInfo.userId sarAccessEO.reNewPeople = this.$store.getters.userInfo.userId
sarAccessEO.inforlist = rowlist sarAccessEO.inforlist = rowlist
sarAccessEO.inforlist1 = rowlist1 sarAccessEO.inforlist1 = rowlist1
sarAccessEO.inforlist2 = rowlist2 // 在产车 和 新车型 实施日期与后台对接的不对
sarAccessEO.inforlist3 = rowlist3 sarAccessEO.inforlist2 = rowlist3
sarAccessEO.inforlist3 = rowlist2
sarAccessEO.inforlist4 = rowlist4 sarAccessEO.inforlist4 = rowlist4
sarAccessEO.countryArea = sarAccessEO.countryArea.join(',') sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
// sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',') // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
@@ -2498,6 +2483,13 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.customDataPicker{
border: 1px solid #DCDFE6;
border-radius: 4px;
/deep/ .add-form-item .el-form-item__content{
margin-left: 0 !important;
}
}
.list-of-standards-and-regulations-details { .list-of-standards-and-regulations-details {
height: calc(~'100% - 50px'); height: calc(~'100% - 50px');
background: #ffffff; background: #ffffff;