|
@@ -52,9 +52,9 @@
|
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
</div> -->
|
|
</div> -->
|
|
- <span style="color: #ffa11e;margin-bottom: 12px;">※上一次导入的文件中存在外协项目、外协单位、计量单位相同,但价格不同的项,请选择需要保留的项※</span>
|
|
|
|
|
|
+ <span style="color: #ffa11e;">※导入的文件中存在外协项目、外协单位、计量单位相同,但价格不同的项,请选择需要保留的项※</span>
|
|
<!-- table区域-begin -->
|
|
<!-- table区域-begin -->
|
|
- <div>
|
|
|
|
|
|
+ <div style="margin-top: 10px;">
|
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
@@ -70,10 +70,9 @@
|
|
:dataSource="dataSource"
|
|
:dataSource="dataSource"
|
|
:pagination="ipagination"
|
|
:pagination="ipagination"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
|
|
|
+ :rowSelection="rowSelection"
|
|
class="j-table-force-nowrap"
|
|
class="j-table-force-nowrap"
|
|
@change="handleTableChange">
|
|
@change="handleTableChange">
|
|
-
|
|
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
<div v-html="text"></div>
|
|
<div v-html="text"></div>
|
|
</template>
|
|
</template>
|
|
@@ -197,14 +196,42 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getSuperFieldList();
|
|
|
|
|
|
+ this.getSuperFieldList();
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
importExcelUrl: function(){
|
|
importExcelUrl: function(){
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
},
|
|
},
|
|
|
|
+ rowSelection: function(){
|
|
|
|
+ return {
|
|
|
|
+ selectedRowKeys: this.selectedRowKeys,
|
|
|
|
+ onSelect: this.onSelect,
|
|
|
|
+ onChange: this.onSelectChange,
|
|
|
|
+ columnTitle: ' ', // 去掉全选框
|
|
|
|
+ getCheckboxProps: (record) => ({
|
|
|
|
+ props: {
|
|
|
|
+ // 动态设置不可选
|
|
|
|
+ disabled: record.disabled
|
|
|
|
+ },
|
|
|
|
+ }),
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 重复项表格多选确定方法
|
|
|
|
+ onSelect(record, selected, selectedRows, nativeEvent){
|
|
|
|
+ // console.log(record, selected, selectedRows, nativeEvent)
|
|
|
|
+ for (let i = 0; i < this.dataSource.length; i++) {
|
|
|
|
+ const element = this.dataSource[i];
|
|
|
|
+ var panduan = element.wxProject === record.wxProject && element.wxCompany === record.wxCompany && element.unit === record.unit && element.id !== record.id
|
|
|
|
+ if(panduan){
|
|
|
|
+ element.disabled = !element.disabled
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 这一步重新赋值才能实现动态改变disabled
|
|
|
|
+ this.dataSource = [...this.dataSource]
|
|
|
|
+ // console.log(this.dataSource)
|
|
|
|
+ },
|
|
initDictConfig(){
|
|
initDictConfig(){
|
|
},
|
|
},
|
|
handleRepeat() {
|
|
handleRepeat() {
|