mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 12:56:45 +08:00
-- bug 项目搜索时间
This commit is contained in:
@@ -47,14 +47,14 @@
|
|||||||
showSearch
|
showSearch
|
||||||
></a-select>
|
></a-select>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="select">-->
|
<div class="select">
|
||||||
<!-- <a-date-picker-->
|
<a-range-picker
|
||||||
<!-- v-model:value="searchParam.createTime"-->
|
v-model:value="searchParam.valueDate"
|
||||||
<!-- type="date"-->
|
style="border-radius: 8px; height: 40px; margin-left: 5px"
|
||||||
<!-- placeholder="创建时间"-->
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
<!-- style="width: 270px"-->
|
valueFormat="X"
|
||||||
<!-- />-->
|
/>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<div style="display: flex; margin-bottom: 20px">
|
<div style="display: flex; margin-bottom: 20px">
|
||||||
<div class="btnn btn1" @click="searchSubmit">
|
<div class="btnn btn1" @click="searchSubmit">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
@@ -202,7 +202,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="inname">项目经理:</div>
|
<div class="inname">项目经理:</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<ProjectManager v-model:value="projectInfo.managerId" v-model:name="projectInfo.manager" mode="multiple"></ProjectManager>
|
<ProjectManager v-model:value="projectInfo.managerId" v-model:name="projectInfo.manager"
|
||||||
|
mode="multiple"></ProjectManager>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -347,7 +348,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modalMain">
|
<div class="modalMain">
|
||||||
<router-link :to="`/projectadd?parentId=${projectInfo.parentId || ''}&parentName=${projectInfo.parentName || ''}`">
|
<router-link
|
||||||
|
:to="`/projectadd?parentId=${projectInfo.parentId || ''}&parentName=${projectInfo.parentName || ''}`">
|
||||||
<div
|
<div
|
||||||
class="taskbox"
|
class="taskbox"
|
||||||
style="
|
style="
|
||||||
@@ -853,7 +855,8 @@ export default {
|
|||||||
searchParam: {
|
searchParam: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
}
|
},
|
||||||
|
valueDate: []
|
||||||
});
|
});
|
||||||
// 数据接入 - start -
|
// 数据接入 - start -
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -876,6 +879,17 @@ export default {
|
|||||||
getTableDate()
|
getTableDate()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function timeChange(e) {
|
||||||
|
console.log(e)
|
||||||
|
if (e && e.length === 2) {
|
||||||
|
state.searchParam.beginTime = e[0]
|
||||||
|
state.searchParam.endTime = e[1]
|
||||||
|
} else {
|
||||||
|
state.searchParam.beginTime = ''
|
||||||
|
state.searchParam.endTime = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function validate(obj, errorMsgs) {
|
function validate(obj, errorMsgs) {
|
||||||
for (let i in errorMsgs) {
|
for (let i in errorMsgs) {
|
||||||
if (!obj[i]) {
|
if (!obj[i]) {
|
||||||
@@ -1439,7 +1453,7 @@ export default {
|
|||||||
className="operation3"
|
className="operation3"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
state.projectInfo = {parentName: value.record.name, parentId: value.record.projectId,type:2};
|
state.projectInfo = {parentName: value.record.name, parentId: value.record.projectId, type: 2};
|
||||||
state.reminderModal = true;
|
state.reminderModal = true;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -1514,7 +1528,11 @@ export default {
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const getTableDate = () => api.getProjectList(state.searchParam).then((res) => {
|
const getTableDate = () => api.getProjectList({
|
||||||
|
...state.searchParam,
|
||||||
|
beginTime: state.searchParam.valueDate && state.searchParam.valueDate.length === 2 ? state.searchParam.valueDate[0] : '',
|
||||||
|
endTime: state.searchParam.valueDate && state.searchParam.valueDate.length === 2 ? state.searchParam.valueDate[1] : ''
|
||||||
|
}).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
state.tableDataTotal = Number(res.data.data.total);
|
state.tableDataTotal = Number(res.data.data.total);
|
||||||
const data = res.data.data.rows;
|
const data = res.data.data.rows;
|
||||||
@@ -1626,6 +1644,7 @@ export default {
|
|||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
timeChange,
|
||||||
expandTable,
|
expandTable,
|
||||||
showModal,
|
showModal,
|
||||||
closeModal,
|
closeModal,
|
||||||
|
|||||||
Reference in New Issue
Block a user