|
@@ -3,15 +3,15 @@
|
|
|
<el-container class="hc-project-info-dialog">
|
|
|
<el-header>
|
|
|
<div class="left">
|
|
|
- <el-button hc-btn color="#626aef" style="color: white">计量管理</el-button>
|
|
|
- <el-button hc-btn color="#e233fb" style="color: white">征拆划分</el-button>
|
|
|
- <el-button hc-btn color="#ac54ff" style="color: white">实验划分</el-button>
|
|
|
- <el-button hc-btn type="success" style="color: white">WBS树管理</el-button>
|
|
|
- <el-button hc-btn color="#2bbeed" style="color: white">日志树管理</el-button>
|
|
|
+ <el-button hc-btn color="#626aef" style="color: white" @click="toCheck('measure')">计量管理</el-button>
|
|
|
+ <el-button hc-btn color="#e233fb" style="color: white" @click="toCheck('lar')">征拆划分</el-button>
|
|
|
+ <el-button hc-btn color="#ac54ff" style="color: white" @click="toCheck('test')">实验划分</el-button>
|
|
|
+ <el-button hc-btn type="success" style="color: white" @click="toCheck('wbsTree')">WBS树管理</el-button>
|
|
|
+ <el-button hc-btn color="#2bbeed" style="color: white" @click="toCheck('logTree')">日志树管理</el-button>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <el-button hc-btn type="warning">编辑项目</el-button>
|
|
|
- <el-button hc-btn type="primary">创建合同段</el-button>
|
|
|
+ <el-button hc-btn type="warning" @click="toCheck('editProject')">编辑项目</el-button>
|
|
|
+ <el-button hc-btn type="primary" @click="toCheck('addContract')">创建合同段</el-button>
|
|
|
<el-button hc-btn type="danger" @click="delProject">删除项目</el-button>
|
|
|
</div>
|
|
|
</el-header>
|
|
@@ -39,8 +39,8 @@
|
|
|
<div class="footer">
|
|
|
<div class="time">{{ item.updateTime }}</div>
|
|
|
<div class="action">
|
|
|
- <el-link type="warning">编辑合同段信息</el-link>
|
|
|
- <el-link v-if="item.contractType === 1" type="success">分配WBS</el-link>
|
|
|
+ <el-link type="warning" @click="toCheck('editContract', item)">编辑合同段信息</el-link>
|
|
|
+ <el-link v-if="item.contractType === 1" type="success" @click="toCheck('wbsContract', item)">分配WBS</el-link>
|
|
|
<el-link type="danger" @click="delContract(item)">删除</el-link>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
<script setup>
|
|
|
import { delMessage } from 'hc-vue3-ui'
|
|
|
import { ref, watch } from 'vue'
|
|
|
-import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
+import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
import mainApi from '~api/project/project'
|
|
|
import contractApi from '~api/project/contract'
|
|
|
|
|
@@ -67,6 +67,9 @@ const props = defineProps({
|
|
|
},
|
|
|
})
|
|
|
|
|
|
+//事件
|
|
|
+const emit = defineEmits(['change', 'check'])
|
|
|
+
|
|
|
//双向绑定
|
|
|
// eslint-disable-next-line no-undef
|
|
|
const isShow = defineModel('modelValue', {
|
|
@@ -120,7 +123,8 @@ const delProject = () => {
|
|
|
const { error, code, msg } = await mainApi.del(projectId.value)
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success('删除成功')
|
|
|
- getContractList(projectId.value).then()
|
|
|
+ dialogClose()
|
|
|
+ emit('change')
|
|
|
} else {
|
|
|
window.$message.error(msg ?? '删除失败')
|
|
|
}
|
|
@@ -139,6 +143,15 @@ const delContract = (item) => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+//功能事件回调
|
|
|
+const toCheck = (type, item = {}) => {
|
|
|
+ //measure, lar, test, wbsTree, logTree, editProject, addContract, editContract, wbsContract
|
|
|
+ //计量管理,征拆划分,实验划分,WBS树管理,日志树管理,编辑项目,创建合同段,编辑合同段信息,分配WBS
|
|
|
+ const info = deepClone(projectInfo.value)
|
|
|
+ dialogClose()
|
|
|
+ emit('check', { type, info, item })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|