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