Commit d65714cc authored by wangxl's avatar wangxl

33333

parent 526fb8dc
<template>
<div>
<a-row>
<a-col :span="24">
<div class="tb-title">
<span>设备</span>
</div>
</a-col>
</a-row>
<a-row type="flex" class="row_center">
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div>序号</div>
</div>
</a-col>
<a-col :span="20" class="bg-gray">
<div class="special-middle">
<div>名称</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div>操作</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in deviceList" :key="'deviceList'+index" type="flex" class="row_center">
<a-col :span="2">
<div class="special-middle">
<div>
{{ index + 1 }}
</div>
</div>
</a-col>
<a-col :span="20">
<div class="special-middle">
<div>
<a-form-model-item :prop="'deviceList.' + index + '.name'" :rules="{required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.name" :maxLength="50" placeholder="单位名称" style="width: 80%" />
</a-form-model-item>
</div>
</div>
</a-col>
<a-col :span="2">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeArray(item)">
<a-button type="link" size="small">[删除]</a-button>
</a-popconfirm>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="24" style="text-align: center;">
<div class="special-middle">
<a-button type="dashed" style="width: 50%" @click="addArray">
<a-icon type="plus" /> 添加
</a-button>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
const Device = {
name: null,
}
export default {
name: 'deviceEdit',
data () {
return {
}
},
props: {
deviceList: {
type: Array,
default: () => {
return []
}
},
},
components: {
},
created () {
},
methods: {
addArray () {//添加成员
this.deviceList.push({ ...Device })
},
removeArray (item) {//移除成员
let index = this.deviceList.indexOf(item)
if (index !== -1) {
this.deviceList.splice(index, 1)
}
},
},
}
</script>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"> <div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArrey(item)"> <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArray(item)">
<a-button type="link" size="small">删除</a-button> <a-button type="link" size="small">删除</a-button>
</a-popconfirm> </a-popconfirm>
</div> </div>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<a-row type="flex"> <a-row type="flex">
<a-col :span="24" style="text-align: center"> <a-col :span="24" style="text-align: center">
<div class="special-middle"> <div class="special-middle">
<a-button type="dashed" style="width: 20%" @click="addArrey()"> <a-button type="dashed" style="width: 20%" @click="addArray()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span> <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button> </a-button>
</div> </div>
...@@ -126,10 +126,10 @@ export default { ...@@ -126,10 +126,10 @@ export default {
}, },
methods: { methods: {
addArrey () {//添加成员 addArray () {//添加成员
this.managementRuleList.push({ ...ManagementRule }) this.managementRuleList.push({ ...ManagementRule })
}, },
deleteArrey (item) {//移除成员 deleteArray (item) {//移除成员
let index = this.managementRuleList.indexOf(item) let index = this.managementRuleList.indexOf(item)
if (index !== -1) { if (index !== -1) {
this.managementRuleList.splice(index, 1) this.managementRuleList.splice(index, 1)
......
...@@ -583,8 +583,11 @@ ...@@ -583,8 +583,11 @@
</a-col> </a-col>
</a-row> </a-row>
<!-- 购置设备预算明细表 --> <!-- 设备费-购置设备预算明细表 -->
<equipments-edit :equipments.sync="formData.equipments"></equipments-edit> <!-- <equipments-edit :equipments.sync="formData.equipments" /> -->
<device-edit :deviceList.sync="formData.deviceList" />
<!-- 附件 --> <!-- 附件 -->
<file-edit :fileList.sync="formData.fileList" /> <file-edit :fileList.sync="formData.fileList" />
...@@ -598,6 +601,9 @@ import previewFile from '@/views/components/common/previewFile' ...@@ -598,6 +601,9 @@ import previewFile from '@/views/components/common/previewFile'
import { getType } from '@/views/utils/auth' import { getType } from '@/views/utils/auth'
import projectMemberEdit from '@/views/report/project/components/projectMemberEdit' import projectMemberEdit from '@/views/report/project/components/projectMemberEdit'
import cooperativeUnitsEdit from '@/views/report/project/components/cooperativeUnitsEdit' import cooperativeUnitsEdit from '@/views/report/project/components/cooperativeUnitsEdit'
import deviceEdit from '@/views/report/project/components/deviceEdit'
import budgetEdit from '@/views/report/project/components/budgetEdit' import budgetEdit from '@/views/report/project/components/budgetEdit'
import fundPlanEdit from '@/views/report/project/components/fundPlanEdit' import fundPlanEdit from '@/views/report/project/components/fundPlanEdit'
import projectKpiEdit from '@/views/report/project/components/projectKpiEdit' import projectKpiEdit from '@/views/report/project/components/projectKpiEdit'
...@@ -654,7 +660,7 @@ import cascaderSelect from '@/views/components/common/cascaderSelect' ...@@ -654,7 +660,7 @@ import cascaderSelect from '@/views/components/common/cascaderSelect'
export default { export default {
name: 'projectEdit', name: 'projectEdit',
components: { components: {
projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, equipmentsEdit projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, equipmentsEdit,deviceEdit
}, },
props: { props: {
value: { value: {
...@@ -715,7 +721,7 @@ export default { ...@@ -715,7 +721,7 @@ export default {
members: [], members: [],
budget: [], budget: [],
fundPlan: [], fundPlan: [],
equipments: [], deviceList: [],
fileList: [], fileList: [],
auditList: [], auditList: [],
managerDept: "", managerDept: "",
...@@ -791,8 +797,8 @@ export default { ...@@ -791,8 +797,8 @@ export default {
if (!!!this.formData.members || this.formData.members.length == 0) if (!!!this.formData.members || this.formData.members.length == 0)
this.formData.members = [] this.formData.members = []
if (!!!this.formData.equipments || this.formData.equipments.length == 0) if (!!!this.formData.deviceList || this.formData.deviceList.length == 0)
this.formData.equipments = [] this.formData.deviceList = []
if (!!!this.formData.fileList || !this.formData.fileList.length || this.formData.fileList.length == 0) { if (!!!this.formData.fileList || !this.formData.fileList.length || this.formData.fileList.length == 0) {
this.formData.fileList = [] this.formData.fileList = []
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"> <div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArrey(item)"> <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArray(item)">
<a-button type="link" size="small">删除</a-button> <a-button type="link" size="small">删除</a-button>
</a-popconfirm> </a-popconfirm>
</div> </div>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<a-row type="flex"> <a-row type="flex">
<a-col :span="24" style="text-align: center"> <a-col :span="24" style="text-align: center">
<div class="special-middle"> <div class="special-middle">
<a-button type="dashed" style="width: 20%" @click="addArrey()"> <a-button type="dashed" style="width: 20%" @click="addArray()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span> <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button> </a-button>
</div> </div>
...@@ -128,10 +128,10 @@ export default { ...@@ -128,10 +128,10 @@ export default {
}, },
methods: { methods: {
addArrey () {//添加成员 addArray () {//添加成员
this.projectResearchList.push({ ...ProjResearch }) this.projectResearchList.push({ ...ProjResearch })
}, },
deleteArrey (item) {//移除成员 deleteArray (item) {//移除成员
let index = this.projectResearchList.indexOf(item) let index = this.projectResearchList.indexOf(item)
if (index !== -1) { if (index !== -1) {
this.projectResearchList.splice(index, 1) this.projectResearchList.splice(index, 1)
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<div class="special-middle"> <div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArrey(item)"> <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArray(item)">
<a-button type="link" size="small">删除</a-button> <a-button type="link" size="small">删除</a-button>
</a-popconfirm> </a-popconfirm>
</div> </div>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<a-row type="flex"> <a-row type="flex">
<a-col :span="24" style="text-align: center"> <a-col :span="24" style="text-align: center">
<div class="special-middle"> <div class="special-middle">
<a-button type="dashed" style="width: 20%" @click="addArrey()"> <a-button type="dashed" style="width: 20%" @click="addArray()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span> <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button> </a-button>
</div> </div>
...@@ -156,10 +156,10 @@ export default { ...@@ -156,10 +156,10 @@ export default {
}, },
methods: { methods: {
addArrey () {//添加成员 addArray () {//添加成员
this.projectSubList.push({ ...ProjectSub }) this.projectSubList.push({ ...ProjectSub })
}, },
deleteArrey (item) {//移除成员 deleteArray (item) {//移除成员
let index = this.projectSubList.indexOf(item) let index = this.projectSubList.indexOf(item)
if (index !== -1) { if (index !== -1) {
this.projectSubList.splice(index, 1) this.projectSubList.splice(index, 1)
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<a-row type="flex"> <a-row type="flex">
<a-col :span="24" style="text-align: center"> <a-col :span="24" style="text-align: center">
<div class="special-middle"> <div class="special-middle">
<a-button type="dashed" style="width: 20%" @click="addArrey()"> <a-button type="dashed" style="width: 20%" @click="addArray()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span> <a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button> </a-button>
</div> </div>
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
created() { created() {
}, },
methods: { methods: {
addArrey() { addArray() {
this.unitPayment.push(Object.assign({ ...Payment })) this.unitPayment.push(Object.assign({ ...Payment }))
}, },
deleteUnitPayment(item) { deleteUnitPayment(item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment