feat: 看板

main
许宏杰 1 month ago
parent 16e39ed007
commit d147f3e805

@ -2,7 +2,7 @@
VITE_DEV_PORT = '8080'
# development path
VITE_DEV_PATH = 'http://192.168.0.128'
VITE_DEV_PATH = 'http://192.168.0.128:8083'
# production path
VITE_PRO_PATH = 'http://192.168.0.128:8083'

@ -20,8 +20,8 @@ export interface MyRequestInstance extends Axios {
}
const axiosInstance = axios.create({
// baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : ''}${axiosPre}`,
baseURL:`${import.meta.env.VITE_PRO_PATH}${axiosPre}`,
baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : ''}${axiosPre}`,
// baseURL:`${import.meta.env.VITE_PRO_PATH}${axiosPre}`,
timeout: ResultEnum.TIMEOUT
}) as unknown as MyRequestInstance

@ -4,4 +4,4 @@ import FlowChart from './FlowChart'
import Three from './Three'
import Mores from './Mores'
export const DecorateList = [...Borders,]// ...Decorates,...FlowChart, ...Three, ...Mores
export const DecorateList = [...Borders,...Decorates,...Three]// ...Decorates,...FlowChart, ...Three, ...Mores

@ -21,7 +21,19 @@
<section v-show="boardLsit.length > 0">
<div class="history-title">看板历史记录</div>
<div class="history-list">
<div class="history-item"></div>
<div class="history-item" v-for="item in boardLsit" :key="item.id" @click="getBoardInfo(item.id)">
<div class="history-row-title">{{ item.projectName }}</div>
<div class="history-row-icon" @click.stop="delProjectItem(item.id)">
<n-icon size="14" color="#F25D44" class="del-icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32">
<path d="M12 12h2v12h-2z" fill="currentColor"></path>
<path d="M18 12h2v12h-2z" fill="currentColor"></path>
<path d="M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z" fill="currentColor"></path>
<path d="M12 2h8v2h-8z" fill="currentColor"></path>
</svg>
</n-icon>
</div>
</div>
</div>
</section>
</div>
@ -37,12 +49,21 @@ let boardLsit = ref([])
const router = useRouter()
//List
const fetchList = async () => {
const res = await projectListApi()
console.log(res)
const res = await projectListApi({
page: 1,
limit: 100,
status: 1
})
boardLsit.value = res.data
}
//
const delProjectItem = async id => {
const res = await deleteProjectApi({ ids: id })
await deleteProjectApi({ ids: id })
fetchList()
}
const getBoardInfo = id => {
router.push('/board/' + id)
}
const formatFristIssue = value => {
@ -67,7 +88,7 @@ const getMessageInfo = id => {
}
onMounted(() => {
// fetchList()
fetchList()
messageList()
})

@ -107,8 +107,8 @@ const getList = async () => {
<style lang="scss" scoped>
.list-query {
width: 300px;
height: 150px;
width: 400px;
height: 200px;
display: flex;
flex-direction: column;
overflow-y: auto;
@ -135,12 +135,12 @@ const getList = async () => {
}
}
.issue-list {
width: 250px;
width: 350px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
.issue-item {
padding: 10px 0;
padding: 20px 0;
color: '#fff';
text-align: center;
background-color: #3d424d;

@ -58,7 +58,7 @@ const saveMessage = async path => {
//
if (useMessageRoom.messageRoom.content.length > 0) {
useMessageRoom.messageRoom.content.forEach(instance => {
if (ehcatrsType.includes( instance.type) && instance.chartInstanceItem) {
if (ehcatrsType.includes(instance.type) && instance.chartInstanceItem) {
instance.chartInstanceItem.dispose()
}
})
@ -85,7 +85,6 @@ const saveMessage = async path => {
}
const handlerBoard = async path => {
history.value.fetchList()
try {
//
const res = await createProjectApi({
@ -106,9 +105,10 @@ const handlerBoard = async path => {
}
const handlerPath = (path, index) => {
if (index === 0) {
saveMessage(path)
} else if (index === 1) {
history.value.fetchList()
saveMessage(path)
if (index === 1) {
handlerBoard(path)
}
}

@ -3,7 +3,6 @@ const obj = {
dimensions: ['product', 'data1'],
source:[]
}
if(res.type === 'bar' || res.type === 'line'){
res.data.forEach((item,index) => {
obj.source.push({

Loading…
Cancel
Save