项目清单
This commit is contained in:
@@ -189,14 +189,14 @@
|
|||||||
<div class="standards-drawer-table standards-drawer-table-one" v-if="!showTableFlag">
|
<div class="standards-drawer-table standards-drawer-table-one" v-if="!showTableFlag">
|
||||||
<el-table
|
<el-table
|
||||||
v-show="!isListType"
|
v-show="!isListType"
|
||||||
|
ref="searchTable"
|
||||||
|
@selection-change="sarAccessInfoSearchSelect"
|
||||||
:data="sarAccessInfoSearchList"
|
:data="sarAccessInfoSearchList"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
border
|
border
|
||||||
height="300px"
|
height="300px"
|
||||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="sarAccessInfoSearchSelect"
|
|
||||||
ref="searchTable"
|
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="accessSarTypeSelect"
|
@selection-change="accessSarTypeSelect"
|
||||||
ref="searchTable"
|
ref="accessTypeSelect"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -293,15 +293,6 @@
|
|||||||
<div class="list-entry">
|
<div class="list-entry">
|
||||||
<el-divider content-position="left">清单条目</el-divider>
|
<el-divider content-position="left">清单条目</el-divider>
|
||||||
<div class="action-bar">
|
<div class="action-bar">
|
||||||
<el-button
|
|
||||||
class="common-button-default"
|
|
||||||
size="small" @click="moveUp" v-if="!disabledFlag"
|
|
||||||
>上移</el-button>
|
|
||||||
<el-button
|
|
||||||
class="common-button-default"
|
|
||||||
size="small" @click="moveDown"
|
|
||||||
v-if="!disabledFlag"
|
|
||||||
>下移</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
class="common-button-default export-button"
|
class="common-button-default export-button"
|
||||||
size="mini" @click="exportAccessInfo('apart')"
|
size="mini" @click="exportAccessInfo('apart')"
|
||||||
@@ -315,7 +306,7 @@
|
|||||||
><i class="iconfont"></i>删除</el-button>
|
><i class="iconfont"></i>删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="entryTable"
|
ref="entryTable"
|
||||||
:data="sarAccessInfoList"
|
:data="sarAccessInfoList"
|
||||||
class="un-select"
|
class="un-select"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -366,6 +357,22 @@
|
|||||||
width="120px"
|
width="120px"
|
||||||
label="文本状态">
|
label="文本状态">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
class="common-button-default"
|
||||||
|
type="primary"
|
||||||
|
size="small" @click="moveUp(scope.$index, scope.row)"
|
||||||
|
v-if="!disabledFlag"
|
||||||
|
>上移</el-button>
|
||||||
|
<el-button
|
||||||
|
class="common-button-default"
|
||||||
|
type="danger"
|
||||||
|
size="small" @click="moveDown(scope.$index, scope.row)"
|
||||||
|
v-if="!disabledFlag"
|
||||||
|
>下移</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
@@ -1011,73 +1018,45 @@ export default {
|
|||||||
})
|
})
|
||||||
if(addList > -1){
|
if(addList > -1){
|
||||||
this.$message.warning('请勿添加重复数据')
|
this.$message.warning('请勿添加重复数据')
|
||||||
} else(
|
this.$refs.accessTypeSelect.clearSelection()
|
||||||
|
this.$refs.entryTable.clearSelection()
|
||||||
|
this.$refs.searchTable.clearSelection()
|
||||||
|
} else{
|
||||||
this.sarAccessInfoList.push(item)
|
this.sarAccessInfoList.push(item)
|
||||||
)
|
this.$refs.accessTypeSelect.clearSelection()
|
||||||
|
this.$refs.entryTable.clearSelection()
|
||||||
|
this.$refs.searchTable.clearSelection()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.selectedAccInfoSearchList = []
|
|
||||||
this.$refs.entryTable.clearSelection()
|
|
||||||
this.$refs.searchTable.clearSelection()
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 上移 事件
|
// 上移 事件
|
||||||
moveUp () {
|
moveUp (index, row) {
|
||||||
// i 全部对象数组的下标
|
if (index === 0) {
|
||||||
// s 选中对象数组的下标
|
this.$message({
|
||||||
let sarAccessInfoListArry = JSON.parse(JSON.stringify(this.sarAccessInfoListArry))
|
message: '已经是列表中第一个素材!',
|
||||||
if (sarAccessInfoListArry.length === 1) {
|
type: 'warning'
|
||||||
//数组交换下标
|
})
|
||||||
console.log('s', sarAccessInfoListArry);
|
} else {
|
||||||
console.log('i',this.sarAccessInfoList);
|
let temp = this.sarAccessInfoList[index - 1]
|
||||||
for (var s in sarAccessInfoListArry) {
|
this.$set(this.sarAccessInfoList, index - 1, this.sarAccessInfoList[index])
|
||||||
for (var i in this.sarAccessInfoList) {
|
this.$set(this.sarAccessInfoList, index, temp)
|
||||||
if (sarAccessInfoListArry[s].resId === this.sarAccessInfoList[i].resId) {
|
}
|
||||||
if (Number(i) !== 0) {
|
|
||||||
let tempOption = this.sarAccessInfoList[i - 1]
|
|
||||||
this.$set(this.sarAccessInfoList, i - 1, this.sarAccessInfoList[i])
|
|
||||||
this.$set(this.sarAccessInfoList, i, tempOption)
|
|
||||||
// this.sarAccessInfoListArry = []
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
this.$message.error('数据已经是第一个,请选择其他数据上移!')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (this.sarAccessInfoListArry.length === 0) {
|
|
||||||
this.$message.error('请选择需要移动的数据!')
|
|
||||||
} else {
|
|
||||||
this.$message.error('请选择单一数据进行移动!')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 下移事件
|
moveDown (index) {
|
||||||
moveDown () {
|
if (index === (this.sarAccessInfoList.length - 1)) {
|
||||||
// y 全部对象数组的下标
|
this.$message({
|
||||||
// t 选中对象数组的下标
|
message: '已经是列表中最后一个素材!',
|
||||||
if (this.sarAccessInfoListArry.length === 1) {
|
type: 'warning'
|
||||||
for (var t in this.sarAccessInfoListArry) {
|
})
|
||||||
for (var y in this.sarAccessInfoList) {
|
} else {
|
||||||
if (this.sarAccessInfoListArry[t].resId === this.sarAccessInfoList[y].resId) {
|
let i = this.sarAccessInfoList[index + 1]
|
||||||
var ass = this.sarAccessInfoList.length - 1
|
this.$set(this.sarAccessInfoList, index + 1, this.sarAccessInfoList[index])
|
||||||
if (Number(y) !== Number(ass)) {
|
this.$set(this.sarAccessInfoList, index, i)
|
||||||
var s = parseInt(y) + 1
|
}
|
||||||
var tempOption = this.sarAccessInfoList[parseInt(s)]
|
|
||||||
this.$set(this.sarAccessInfoList, parseInt(s), this.sarAccessInfoList[parseInt(y)])
|
|
||||||
this.$set(this.sarAccessInfoList, parseInt(y), tempOption)
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
this.$message.error('数据已经是最后一个,请选择其他数据进行移动!')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (this.sarAccessInfoListArry.length === 0) {
|
|
||||||
this.$message.error('请选择需要移动的数据!')
|
|
||||||
} else {
|
|
||||||
this.$message.error('请选择单一数据进行移动!')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 点击清单条目导入按钮事件
|
// 点击清单条目导入按钮事件
|
||||||
importmodalFlags () {
|
importmodalFlags () {
|
||||||
@@ -1120,12 +1099,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 清单条目 table select事件
|
// 清单条目 table select事件
|
||||||
sarAccessInfoSelect (data) {
|
sarAccessInfoSelect (selectData) {
|
||||||
let sarAccessInfoListArry = [];
|
this.sarAccessInfoListArry = selectData
|
||||||
for(let i = 0; i< data.length; i++){
|
|
||||||
this.sarAccessInfoListArry.push(data[i].id)
|
|
||||||
}
|
|
||||||
console.log(this.sarAccessInfoListArry);
|
|
||||||
},
|
},
|
||||||
// 点击取消按钮 返回事件
|
// 点击取消按钮 返回事件
|
||||||
backCancal () {
|
backCancal () {
|
||||||
@@ -1207,12 +1182,9 @@ export default {
|
|||||||
return row.isRelateAccess === '1'
|
return row.isRelateAccess === '1'
|
||||||
},
|
},
|
||||||
// 数据搜索 table select事件
|
// 数据搜索 table select事件
|
||||||
sarAccessInfoSearchSelect (selectData) {
|
sarAccessInfoSearchSelect (val) {
|
||||||
this.selectedAccInfoSearchList = selectData
|
this.selectedAccInfoSearchList = val
|
||||||
this.selectSearch = []
|
console.log(val)
|
||||||
for(let i = 0; i <selectData.length; i++) {
|
|
||||||
this.selectSearch.push(selectData[i].id)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 数据搜索 清单类型 table select事件
|
// 数据搜索 清单类型 table select事件
|
||||||
accessSarTypeSelect (selectData) {
|
accessSarTypeSelect (selectData) {
|
||||||
|
|||||||
+46
-68
@@ -238,7 +238,7 @@
|
|||||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="accessSarTypeSelect"
|
@selection-change="accessSarTypeSelect"
|
||||||
ref="searchTable"
|
ref="accessTypeSelect"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -278,15 +278,6 @@
|
|||||||
<div class="list-entry">
|
<div class="list-entry">
|
||||||
<el-divider content-position="left">清单条目</el-divider>
|
<el-divider content-position="left">清单条目</el-divider>
|
||||||
<div class="action-bar">
|
<div class="action-bar">
|
||||||
<el-button
|
|
||||||
class="common-button-default"
|
|
||||||
size="small" @click="moveUp" v-if="!disabledFlag"
|
|
||||||
>上移</el-button>
|
|
||||||
<el-button
|
|
||||||
class="common-button-default"
|
|
||||||
size="small" @click="moveDown"
|
|
||||||
v-if="!disabledFlag"
|
|
||||||
>下移</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
class="common-button-default export-button"
|
class="common-button-default export-button"
|
||||||
size="mini" @click="exportAccessInfo('apart')"
|
size="mini" @click="exportAccessInfo('apart')"
|
||||||
@@ -351,6 +342,22 @@
|
|||||||
width="120px"
|
width="120px"
|
||||||
label="文本状态">
|
label="文本状态">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
class="common-button-default"
|
||||||
|
type="primary"
|
||||||
|
size="small" @click="moveUp(scope.$index, scope.row)"
|
||||||
|
v-if="!disabledFlag"
|
||||||
|
>上移</el-button>
|
||||||
|
<el-button
|
||||||
|
class="common-button-default"
|
||||||
|
type="danger"
|
||||||
|
size="small" @click="moveDown(scope.$index, scope.row)"
|
||||||
|
v-if="!disabledFlag"
|
||||||
|
>下移</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
@@ -996,9 +1003,15 @@ export default {
|
|||||||
})
|
})
|
||||||
if(addList > -1){
|
if(addList > -1){
|
||||||
this.$message.warning('请勿添加重复数据')
|
this.$message.warning('请勿添加重复数据')
|
||||||
} else(
|
this.$refs.accessTypeSelect.clearSelection()
|
||||||
|
this.$refs.entryTable.clearSelection()
|
||||||
|
this.$refs.searchTable.clearSelection()
|
||||||
|
} else{
|
||||||
this.sarAccessInfoList.push(item)
|
this.sarAccessInfoList.push(item)
|
||||||
)
|
this.$refs.accessTypeSelect.clearSelection()
|
||||||
|
this.$refs.entryTable.clearSelection()
|
||||||
|
this.$refs.searchTable.clearSelection()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.selectedAccInfoSearchList = []
|
this.selectedAccInfoSearchList = []
|
||||||
this.$refs.entryTable.clearSelection()
|
this.$refs.entryTable.clearSelection()
|
||||||
@@ -1008,60 +1021,28 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 上移 事件
|
// 上移 事件
|
||||||
moveUp () {
|
moveUp (index, row) {
|
||||||
// i 全部对象数组的下标
|
if (index === 0) {
|
||||||
// s 选中对象数组的下标
|
this.$message({
|
||||||
let sarAccessInfoListArry = JSON.parse(JSON.stringify(this.sarAccessInfoListArry))
|
message: '已经是列表中第一个素材!',
|
||||||
if (sarAccessInfoListArry.length === 1) {
|
type: 'warning'
|
||||||
//数组交换下标
|
})
|
||||||
console.log('s', sarAccessInfoListArry);
|
|
||||||
console.log('i',this.sarAccessInfoList);
|
|
||||||
for (var s in sarAccessInfoListArry) {
|
|
||||||
for (var i in this.sarAccessInfoList) {
|
|
||||||
if (sarAccessInfoListArry[s].resId === this.sarAccessInfoList[i].resId) {
|
|
||||||
if (Number(i) !== 0) {
|
|
||||||
let tempOption = this.sarAccessInfoList[i - 1]
|
|
||||||
this.$set(this.sarAccessInfoList, i - 1, this.sarAccessInfoList[i])
|
|
||||||
this.$set(this.sarAccessInfoList, i, tempOption)
|
|
||||||
// this.sarAccessInfoListArry = []
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
this.$message.error('数据已经是第一个,请选择其他数据上移!')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (this.sarAccessInfoListArry.length === 0) {
|
|
||||||
this.$message.error('请选择需要移动的数据!')
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择单一数据进行移动!')
|
let temp = this.sarAccessInfoList[index - 1]
|
||||||
|
this.$set(this.sarAccessInfoList, index - 1, this.sarAccessInfoList[index])
|
||||||
|
this.$set(this.sarAccessInfoList, index, temp)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 下移事件
|
moveDown (index) {
|
||||||
moveDown () {
|
if (index === (this.sarAccessInfoList.length - 1)) {
|
||||||
// y 全部对象数组的下标
|
this.$message({
|
||||||
// t 选中对象数组的下标
|
message: '已经是列表中最后一个素材!',
|
||||||
if (this.sarAccessInfoListArry.length === 1) {
|
type: 'warning'
|
||||||
for (var t in this.sarAccessInfoListArry) {
|
})
|
||||||
for (var y in this.sarAccessInfoList) {
|
|
||||||
if (this.sarAccessInfoListArry[t].resId === this.sarAccessInfoList[y].resId) {
|
|
||||||
var ass = this.sarAccessInfoList.length - 1
|
|
||||||
if (Number(y) !== Number(ass)) {
|
|
||||||
var s = parseInt(y) + 1
|
|
||||||
var tempOption = this.sarAccessInfoList[parseInt(s)]
|
|
||||||
this.$set(this.sarAccessInfoList, parseInt(s), this.sarAccessInfoList[parseInt(y)])
|
|
||||||
this.$set(this.sarAccessInfoList, parseInt(y), tempOption)
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
this.$message.error('数据已经是最后一个,请选择其他数据进行移动!')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (this.sarAccessInfoListArry.length === 0) {
|
|
||||||
this.$message.error('请选择需要移动的数据!')
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择单一数据进行移动!')
|
let i = this.sarAccessInfoList[index + 1]
|
||||||
|
this.$set(this.sarAccessInfoList, index + 1, this.sarAccessInfoList[index])
|
||||||
|
this.$set(this.sarAccessInfoList, index, i)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 点击清单条目导入按钮事件
|
// 点击清单条目导入按钮事件
|
||||||
@@ -1188,12 +1169,9 @@ export default {
|
|||||||
return row.isRelateAccess === '1'
|
return row.isRelateAccess === '1'
|
||||||
},
|
},
|
||||||
// 数据搜索 table select事件
|
// 数据搜索 table select事件
|
||||||
sarAccessInfoSearchSelect (selectData) {
|
sarAccessInfoSearchSelect (val) {
|
||||||
this.selectedAccInfoSearchList = selectData
|
this.selectedAccInfoSearchList = val
|
||||||
this.selectSearch = []
|
console.log(val)
|
||||||
for(let i = 0; i <selectData.length; i++) {
|
|
||||||
this.selectSearch.push(selectData[i].id)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 数据搜索 清单类型 table select事件
|
// 数据搜索 清单类型 table select事件
|
||||||
accessSarTypeSelect (selectData) {
|
accessSarTypeSelect (selectData) {
|
||||||
|
|||||||
+208
-666
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user