[update] 修改企标新增
This commit is contained in:
@@ -243,7 +243,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.box-input {
|
||||
/*.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
@@ -278,7 +278,7 @@
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
@@ -295,9 +295,9 @@
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
//height: 38px;
|
||||
width: calc(100% - 100px);
|
||||
line-height: 38px;
|
||||
//line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px #D52C26 solid;
|
||||
color: #D52C26;
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="optionsData[item.dbFieldName]"
|
||||
:replaceFields="{children:'children', title:'name', key:'id', value: 'itemValue'}"
|
||||
tree-checkable
|
||||
treeCheckStrictly
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
@@ -359,33 +360,13 @@ export default {
|
||||
ruleList.forEach((res, index) => {
|
||||
const rule = []
|
||||
if (res.fieldMustInput === '1') {
|
||||
if (res.fieldShowType === '1') {
|
||||
if ((FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value, FieldType.TEXT_LINK.value).includes(res.fieldShowType)) {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.fieldShowType === '4' || res.fieldShowType === '6' ||
|
||||
res.fieldShowType === '5' || res.fieldShowType === '7'
|
||||
) {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
})
|
||||
} else if (res.fieldShowType === '2') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.fieldShowType === '8' || res.fieldShowType === '9' || res.fieldShowType === '10' || res.fieldShowType === '11') {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.fieldShowType === '3') {
|
||||
} else {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.dbFieldTxt + this.$t('cannotEmpty'),
|
||||
@@ -434,7 +415,7 @@ export default {
|
||||
const attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
attIdList.push(item.id)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
@@ -456,7 +437,12 @@ export default {
|
||||
const formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
if (formInline[res][0] instanceof Object) {
|
||||
// 说明是树选择
|
||||
formInline[res] = formInline[res].map(item => item.value).join(',')
|
||||
} else {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$emit('submitFormData', formInline)
|
||||
@@ -465,6 +451,9 @@ export default {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
clearValidate () {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,22 @@
|
||||
v-model="queryParam[item.dbFieldName]"></a-input>
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 组织机构选择 -->
|
||||
<template v-if="[FieldType.ORGAN_SINGLE.value, FieldType.ORGAN_MORE.value].includes(item.fieldShowType)">
|
||||
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam[item.dbFieldName]"
|
||||
:maxTagCount="1"
|
||||
:show-search="true"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="categoryTreeList"
|
||||
:placeholder="$t('pleaseSelect') + item.dbFieldTxt"
|
||||
/>
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 日期区间选择器 -->
|
||||
<template v-else-if="[FieldType.DATE_SINGLE.value, FieldType.DATE_MORE.value].includes(item.fieldShowType)">
|
||||
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
@@ -120,6 +136,7 @@
|
||||
import JDictSelectTag from '../dict/JDictSelectTag'
|
||||
import { FieldType } from '../../enums/commonEnums'
|
||||
import eventBus from '@/common/event'
|
||||
import { queryDepartTreeList } from '../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'Search',
|
||||
@@ -158,6 +175,7 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
FieldType,
|
||||
categoryTreeList: [], // 组织机构下拉框数据
|
||||
queryParam: {},
|
||||
toggleSearchStatus: false,
|
||||
searchList: [],
|
||||
@@ -170,6 +188,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getSysCategoryTree()
|
||||
this.getSearch()
|
||||
// this.searchList = [
|
||||
// {
|
||||
@@ -240,6 +259,16 @@ export default {
|
||||
this.$emit('reset', JSON.parse(JSON.stringify(this.queryParam)))
|
||||
eventBus.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
||||
},
|
||||
// 获取组织机构树
|
||||
getSysCategoryTree () {
|
||||
queryDepartTreeList().then((res) => {
|
||||
if (res.success) {
|
||||
this.categoryTreeList = res.result
|
||||
} else {
|
||||
this.categoryTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取查询条件列表
|
||||
getSearch () {
|
||||
console.log(this.getQueryConditionFunc)
|
||||
|
||||
@@ -57,13 +57,13 @@ export default {
|
||||
display: flex;
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
//height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
.button-box {
|
||||
margin-left: 10px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
//height: 38px;
|
||||
//line-height: 38px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</span>
|
||||
<span v-else class="tree-node-custom-title">{{ record.title }}</span>
|
||||
</a-tooltip>
|
||||
<template v-if="record.key === mouseInNodeKey">
|
||||
<template v-if="record.key === mouseInNodeKey && record.nodeType !== StandardSystemTreeNodeType.NOT_OPERATE_NODE.value">
|
||||
<!-- 新增-->
|
||||
<a-button icon="plus" class="tree-operate-node-btn" @click="handleTreeAdd(record)"></a-button>
|
||||
<!-- 编辑-->
|
||||
@@ -53,22 +53,23 @@
|
||||
<search ref="searchRef"
|
||||
:flag="flag"
|
||||
:get-query-condition-func="getQueryConditionFunc"
|
||||
search-has="enterpriseStandard:search"
|
||||
@search="searchQuery"
|
||||
@reset="searchReset" />
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'enterpriseStandard:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-button icon="upload" type="primary" ghost>{{ $t('import') }}</a-button>
|
||||
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandard:upload'">{{ $t('import') }}</a-button>
|
||||
</a-upload>
|
||||
<a-button icon="export" type="primary" ghost @click="handleExportXls">{{ $t('export') }}</a-button>
|
||||
<a-button icon="mail" type="primary" ghost @click="handleFileExport">{{ $t('exportWithFile') }}</a-button>
|
||||
<a-button icon="download" type="primary" ghost @click="downTemplate($t('enterpriseStandardLibrary.standard.templateExport'))">{{ $t('templateDownload') }}</a-button>
|
||||
<a-button icon="delete" type="primary" ghost @click="batchDel">{{ $t('batchDelete') }}</a-button>
|
||||
<a-button icon="setting" type="primary" ghost @click="handleAllocationStandard">{{ $t('enterpriseStandardLibrary.standard.allocationStandard') }}</a-button>
|
||||
<a-button icon="minus-circle" type="primary" ghost @click="handleShiftOutStandard">{{ $t('enterpriseStandardLibrary.standard.shiftOutStandard') }}</a-button>
|
||||
<a-button icon="setting" type="primary" ghost @click="handleInitChange">{{ $t('enterpriseStandardLibrary.standard.initChange') }}</a-button>
|
||||
<a-button icon="setting" type="primary" ghost @click="handleTemporaryPermissSet">{{ $t('enterpriseStandardLibrary.standard.temporaryPermissionSet') }}</a-button>
|
||||
<a-button icon="export" type="primary" ghost @click="handleExportXls" v-has="'enterpriseStandard:export'">{{ $t('export') }}</a-button>
|
||||
<a-button icon="mail" type="primary" ghost @click="handleFileExport" v-has="'enterpriseStandard:fileExport'">{{ $t('exportWithFile') }}</a-button>
|
||||
<a-button icon="download" type="primary" ghost @click="downTemplate($t('enterpriseStandardLibrary.standard.templateExport'))" v-has="'enterpriseStandard:templateDownload'">{{ $t('templateDownload') }}</a-button>
|
||||
<a-button icon="delete" type="primary" ghost @click="batchDel" v-has="'enterpriseStandard:batchDel'">{{ $t('batchDelete') }}</a-button>
|
||||
<a-button icon="setting" type="primary" ghost @click="handleAllocationStandard" v-has="'enterpriseStandard:allocationStandard'">{{ $t('enterpriseStandardLibrary.standard.allocationStandard') }}</a-button>
|
||||
<a-button icon="minus-circle" type="primary" ghost @click="handleShiftOutStandard" v-has="'enterpriseStandard:shiftOutStandard'">{{ $t('enterpriseStandardLibrary.standard.shiftOutStandard') }}</a-button>
|
||||
<a-button icon="setting" type="primary" ghost @click="handleInitChange" v-has="'enterpriseStandard:initChange'">{{ $t('enterpriseStandardLibrary.standard.initChange') }}</a-button>
|
||||
<a-button icon="setting" type="primary" ghost @click="handleTemporaryPermissSet" v-has="'enterpriseStandard:temporaryPermissSet'">{{ $t('enterpriseStandardLibrary.standard.temporaryPermissionSet') }}</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<j-table
|
||||
@@ -267,7 +268,7 @@ export default {
|
||||
// 左侧树点击选中
|
||||
treeSelect (selectedKeys) {
|
||||
this.currentTreeNode = selectedKeys
|
||||
this.queryParam.workingGroupId = selectedKeys[0]
|
||||
this.searchParams.workingGroupId = selectedKeys[0]
|
||||
this.loadData()
|
||||
},
|
||||
// 左侧树点击新增
|
||||
@@ -314,6 +315,16 @@ export default {
|
||||
this.mouseInNodeKey = null
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 重置查询
|
||||
*/
|
||||
searchReset () {
|
||||
this.currentTreeNode = null
|
||||
this.searchParams = {}
|
||||
this.selectedRowKeys = []
|
||||
this.getData()
|
||||
this.getTableList()
|
||||
},
|
||||
// 配置标准
|
||||
handleAllocationStandard () {
|
||||
// 没选择左侧树节点,需要提示“请先选择二级及以下体系”
|
||||
|
||||
@@ -46,8 +46,8 @@ export default {
|
||||
getFormFunc: getEnterpriseStandardAddForm,
|
||||
getDocumentInfoFunc: getEnterpriseStandardInfoById,
|
||||
url: {
|
||||
add: '/laws/standard/domestic/commonAdd',
|
||||
edit: '/laws/standard/domestic/commonEdit'
|
||||
add: '/laws/standard/enterprise/commonAdd',
|
||||
edit: '/laws/standard/enterprise/commonEdit'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -65,11 +65,11 @@ export default {
|
||||
})
|
||||
},
|
||||
handleOk () {
|
||||
this.confirmLoading = true
|
||||
this.$refs.addForm.submit()
|
||||
},
|
||||
// 表单提交的回调,获取表单数据
|
||||
submitFormData (formInline) {
|
||||
this.confirmLoading = true
|
||||
let url = ''
|
||||
if (formInline.id) {
|
||||
url = this.url.edit
|
||||
@@ -96,6 +96,7 @@ export default {
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.$refs.addForm.clearValidate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user