mirror of
https://github.com/Teamlinker/Teamlinker.git
synced 2025-06-03 03:00:17 +00:00
Merge branch 'dev' of gitee.com:sx1989827/teamlinker into dev
This commit is contained in:
commit
bb5fab986e
@ -1,34 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- <div class="filter-container">
|
||||
<el-input
|
||||
v-model="listQuery.keyword"
|
||||
placeholder="关键字"
|
||||
style="width: 200px"
|
||||
size="small"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleFilter"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleReset"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
重置
|
||||
</el-button>
|
||||
</div> -->
|
||||
|
||||
<el-row style="padding-bottom: 10px">
|
||||
<el-button type="primary" size="small" @click="handleCreate"
|
||||
>新增问题类型</el-button
|
||||
>新增事务类型</el-button
|
||||
>
|
||||
</el-row>
|
||||
<el-table
|
||||
@ -86,16 +60,6 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- <div class="pagination_box">
|
||||
<el-pagination
|
||||
layout="prev, pager, next"
|
||||
background
|
||||
:total="page.pageCount"
|
||||
@current-change="pageCurChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div> -->
|
||||
|
||||
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
@ -111,7 +75,7 @@
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input type="textarea" :rows="2" v-model="temp.description" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图标" prop="icon">
|
||||
<!-- <el-form-item label="图标" prop="icon">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/api/file/upload"
|
||||
@ -122,7 +86,7 @@
|
||||
<img v-if="temp.icon" :src="temp.icon" class="avatar" />
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false"> 取消 </el-button>
|
||||
@ -164,7 +128,7 @@ export default {
|
||||
},
|
||||
dialogStatus: "",
|
||||
dialogFormVisible: false,
|
||||
temp: {},
|
||||
temp: {name:'',description:''},
|
||||
issueRules: {
|
||||
name: [{ required: true, message: "名称必填", trigger: "blur" }],
|
||||
},
|
||||
@ -191,8 +155,6 @@ export default {
|
||||
);
|
||||
});
|
||||
this.list = data;
|
||||
// this.list = res.data.data;
|
||||
// this.page.pageCount = parseInt(res.data.count);
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
@ -228,7 +190,7 @@ export default {
|
||||
createData() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
createTemp({ issueTypeId: this.temp.issueTypeId }).then(() => {
|
||||
createTemp({ name: this.temp.name,description:this.temp.description }).then(() => {
|
||||
this.fetchData();
|
||||
this.dialogFormVisible = false;
|
||||
this.$notify({
|
||||
|
@ -5,17 +5,18 @@
|
||||
<div class="project-list">
|
||||
<div
|
||||
class="project-item"
|
||||
v-for="(item, index) in [1, 2, 3, 4, 5]"
|
||||
v-for="(item, index) in listData"
|
||||
:key="index"
|
||||
>
|
||||
<div class="pro-cont">
|
||||
<div class="pro-info">
|
||||
<div class="avatar"><UserOutlined /></div>
|
||||
<div class="pro-name">project name</div>
|
||||
<div class="pro-name">{{item.name}}</div>
|
||||
</div>
|
||||
<div class="pro-detail">
|
||||
<div>My open issues</div>
|
||||
<div>Done issues</div>
|
||||
<div>No start:{{item.notstart}}</div>
|
||||
<div>Inprogress:{{item.inprogress}}</div>
|
||||
<div>Done issues:{{item.done}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -23,13 +24,35 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { defineComponent } from 'vue'
|
||||
import { defineComponent, reactive, toRefs, ref } from "vue";
|
||||
import { UserOutlined } from '@ant-design/icons-vue'
|
||||
import axios from "@/plugins/axios";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
UserOutlined
|
||||
},
|
||||
setup() {}
|
||||
setup() {
|
||||
const state = reactive({
|
||||
listData: [],
|
||||
});
|
||||
const getRecentProject = ()=>{
|
||||
axios.get('/project/recent/list', { }).then((res) => {
|
||||
if(res?.code == '0'){
|
||||
state.listData = res.data
|
||||
}else{
|
||||
message.info(res.message)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
getRecentProject()
|
||||
return {
|
||||
...toRefs(state),
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
@ -80,8 +80,13 @@
|
||||
label="Priority"
|
||||
name="priority"
|
||||
>
|
||||
<a-input-number v-model:value="formState.priority" />
|
||||
<a-radio-group v-model:value="formState.priority" button-style="solid">
|
||||
<a-radio-button value="0">high</a-radio-button>
|
||||
<a-radio-button value="1">middle</a-radio-button>
|
||||
<a-radio-button value="2">low</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item :wrapper-col="{ span: 14, offset: 4 }">
|
||||
<a-button type="primary" @click="onSubmit">创建</a-button>
|
||||
<a-button style="margin-left: 10px" @click="resetForm">重置</a-button>
|
||||
@ -92,8 +97,14 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, UnwrapRef, reactive } from 'vue'
|
||||
import axios from '@/plugins/axios'
|
||||
import { message } from 'ant-design-vue';
|
||||
interface FormState {
|
||||
name: string
|
||||
projectId:string,
|
||||
issueTypeId:string,
|
||||
name: string,
|
||||
reporterId?:string,
|
||||
assignerId?:string,
|
||||
priority?:string, //高 中 低
|
||||
}
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
@ -104,7 +115,7 @@ export default defineComponent({
|
||||
name: '',
|
||||
reporterId:'',
|
||||
assignerId:'',
|
||||
priority:''
|
||||
priority:'0'
|
||||
})
|
||||
const projectList = ref([])
|
||||
const issueTypeList = ref([])
|
||||
@ -155,7 +166,23 @@ export default defineComponent({
|
||||
]
|
||||
})
|
||||
const onSubmit = () => {
|
||||
formRef.value.validate().then(() => {})
|
||||
formRef.value.validate().then(() => {
|
||||
let params = {
|
||||
projectId:formState.projectId,
|
||||
issueTypeId:formState.issueTypeId,
|
||||
name:formState.name,
|
||||
reporterId:'432818911597206528 ',
|
||||
assignerId:'432818911597206528 ',
|
||||
priority:formState.priority,
|
||||
}
|
||||
axios.post("/issue/item", params).then((res:any) => {
|
||||
if(res.code == '0'){
|
||||
message.success('create success');
|
||||
}else{
|
||||
message.info(res.message);
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
const resetForm = () => {
|
||||
formRef.value.resetFields()
|
||||
|
37
code/client/web_user/src/pages/issue/list/columns.ts
Normal file
37
code/client/web_user/src/pages/issue/list/columns.ts
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
//首页表格和表单配置 index
|
||||
export const columns = [
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
width:'20%',
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '关键字',
|
||||
dataIndex: 'keyword',
|
||||
width:'20%',
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
width:'20%',
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '图片',
|
||||
dataIndex: 'photo',
|
||||
slots: { customRender: 'photo' },
|
||||
width:'20%',
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
dataIndex: 'action',
|
||||
slots: { customRender: 'action' },
|
||||
width:'20%',
|
||||
ellipsis:true
|
||||
},
|
||||
]
|
108
code/client/web_user/src/pages/issue/list/index.vue
Normal file
108
code/client/web_user/src/pages/issue/list/index.vue
Normal file
@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<div class="list">
|
||||
<div class="search">
|
||||
<a-space>
|
||||
<a-input
|
||||
allowClear
|
||||
v-model:value="queryParams.name"
|
||||
placeholder="名称"
|
||||
@keyup.enter.prevent="searchEnterFun(ueryParams.keyword)"
|
||||
/>
|
||||
<a-select placeholder="select priority" v-model:value="queryParams.priority" style="width: 120px" :options="priorityOptions"></a-select>
|
||||
<a-select placeholder="select assigner" v-model:value="queryParams.assigner" style="width: 120px" :options="assignerOptions"></a-select>
|
||||
<a-select placeholder="select reporter" v-model:value="queryParams.reporter" style="width: 120px" :options="reporterOptions"></a-select>
|
||||
<a-button @click="searchQuery(queryParams.name)" type="primary"
|
||||
>搜索</a-button
|
||||
>
|
||||
</a-space>
|
||||
<div>
|
||||
<a-button @click="createProject" type="primary">创建事务</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:rowKey="(record) => record.id"
|
||||
:pagination="pagination"
|
||||
>
|
||||
<template #photo="{ record }">
|
||||
<img
|
||||
:src="'http://175.27.166.37:13000' + record.photo"
|
||||
width="60"
|
||||
v-if="record.photo"
|
||||
/>
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a @click="onGoSet(record.id)">项目设置</a>
|
||||
<a-popconfirm title="确认删除吗?" @confirm="onDelete(record.id)">
|
||||
<a style="margin-left: 10px">删除</a>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, toRefs, ref, onActivated } from 'vue'
|
||||
import type { SelectProps } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import axios from '@/plugins/axios'
|
||||
import { message } from 'ant-design-vue'
|
||||
export default defineComponent({
|
||||
name: '事务列表',
|
||||
setup() {
|
||||
const priorityOptions = ref<SelectProps['options']>([
|
||||
{
|
||||
value: '0',
|
||||
label: '高',
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: '中',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '低',
|
||||
},
|
||||
]);
|
||||
const assignerOptions = ref<SelectProps['options']>([]);
|
||||
const reporterOptions = ref<SelectProps['options']>([]);
|
||||
const stateData = {
|
||||
queryParams:{
|
||||
name:'',
|
||||
priority:'',
|
||||
assigner:'',
|
||||
reporter:'',
|
||||
}
|
||||
}
|
||||
const searchQuery = ()=>{
|
||||
|
||||
}
|
||||
return {
|
||||
priorityOptions,
|
||||
...toRefs(stateData),
|
||||
searchQuery,
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
margin: 0 20px;
|
||||
}
|
||||
.search {
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
.ant-space {
|
||||
::v-deep() {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<route lang="yaml">
|
||||
meta:
|
||||
level: 1
|
||||
name: '事务列表'
|
||||
layout: auth
|
||||
</route>
|
@ -31,6 +31,7 @@
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a @click="onGoSet(record.id)">项目设置</a>
|
||||
<a @click="onGoSetIssue(record.id)" style="margin-left:5px;">事务</a>
|
||||
<a-popconfirm title="确认删除吗?" @confirm="onDelete(record.id)">
|
||||
<a style="margin-left: 10px">删除</a>
|
||||
</a-popconfirm>
|
||||
@ -72,6 +73,9 @@ export default defineComponent({
|
||||
const onGoSet = (id: string) => {
|
||||
console.log(id, 'idddd')
|
||||
router.push('/project/edit?projectId=' + id)
|
||||
}
|
||||
const onGoSetIssue = (id: string) => {
|
||||
router.push('/issue/list?projectId=' + id)
|
||||
}
|
||||
const createProject = () => {
|
||||
router.push('/project/create')
|
||||
@ -89,6 +93,7 @@ export default defineComponent({
|
||||
...toRefs(stateData),
|
||||
onDelete,
|
||||
onGoSet,
|
||||
onGoSetIssue,
|
||||
handleTableChange,
|
||||
setUrl,
|
||||
searchQuery,
|
||||
|
Loading…
Reference in New Issue
Block a user