上传
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
<el-tag type="success">{{ info.intentionState }}</el-tag>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" plain>修改</el-button>
|
||||
<el-button type="danger" plain>删除</el-button>
|
||||
<el-button type="primary" plain @click="handleUpdate">修改</el-button>
|
||||
<el-button type="danger" plain @click="handleRemove">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-skeleton>
|
||||
@@ -102,11 +102,11 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 新建编辑跟进信息 -->
|
||||
<DialogFollow ref="followRef" />
|
||||
<DialogFollow ref="followRef" @success="getFollowList" />
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup name="DrawerClue">
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import * as ClueApi from '@/api/clue'
|
||||
import * as FollowApi from '@/api/clue/followRecord'
|
||||
@@ -124,6 +124,8 @@ import FlagGreen from '@/assets/imgs/flag/flag_green.png'
|
||||
import FlagBlue from '@/assets/imgs/flag/flag_blue.png'
|
||||
import FlagBlack from '@/assets/imgs/flag/flag_black.png'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const appStore = useAppStore()
|
||||
|
||||
const show = ref(false)
|
||||
@@ -174,17 +176,21 @@ const operateRecordList = ref([])
|
||||
const dialogMap = ref(null)
|
||||
const aMap = ref(null)
|
||||
|
||||
function getFollowList() {
|
||||
FollowApi.getFollowList({ clueId: id }).then((data) => {
|
||||
followRecordList.value = data.map((item) => ({
|
||||
operateUserName: item.operateUserName,
|
||||
centent: item.centent,
|
||||
operateDate: formatDate(item.operateTime),
|
||||
followTime: formatDate(item.operateTime, 'YYYY-MM-DD HH:mm'),
|
||||
nextFollowTime: formatDate(item.nextFollowTime)
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
async function open(id) {
|
||||
try {
|
||||
FollowApi.getFollowList({ clueId: id }).then((data) => {
|
||||
followRecordList.value = data.map((item) => ({
|
||||
operateUserName: item.operateUserName,
|
||||
centent: item.centent,
|
||||
operateDate: formatDate(item.operateTime),
|
||||
followTime: formatDate(item.operateTime, 'YYYY-MM-DD HH:mm'),
|
||||
nextFollowTime: formatDate(item.nextFollowTime)
|
||||
}))
|
||||
})
|
||||
getFollowList()
|
||||
ClueApi.getOpearateRecord({ clueId: id }).then((data) => {
|
||||
operateRecordList.value = data.map((item) => ({
|
||||
operateUserName: item.operateUserName,
|
||||
@@ -300,13 +306,36 @@ defineExpose({
|
||||
|
||||
const followRef = ref()
|
||||
function addFollow() {
|
||||
followRef.value.open('create', null)
|
||||
followRef.value.open(info.value.clueId)
|
||||
}
|
||||
|
||||
function destroyMap() {
|
||||
dialogMap.value = null
|
||||
aMap.value = null
|
||||
}
|
||||
|
||||
const emit = defineEmits(['update', 'getList'])
|
||||
// 修改
|
||||
function handleUpdate() {
|
||||
emit('update', info.value)
|
||||
show.value = false
|
||||
}
|
||||
|
||||
// 删除
|
||||
async function handleRemove() {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await ClueApi.deleteClue(info.value.clueId)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
emit('getList')
|
||||
show.value = false
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user