adaa0abf by lxs

分类分级任务bug修改

1 parent 9aa62fda
...@@ -50,6 +50,8 @@ const tableInfo = ref({ ...@@ -50,6 +50,8 @@ const tableInfo = ref({
50 { 50 {
51 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 51 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
52 return filterVal(scope.row.status, 'status'); 52 return filterVal(scope.row.status, 'status');
53 }, tagType: (scope) => {
54 return scope.row.status == 'Y' ? 'success' : scope.row.status == 'E' ? 'danger' : 'info';
53 } 55 }
54 }, 56 },
55 { label: "任务修改人", field: "updateUserName", width: 120 }, 57 { label: "任务修改人", field: "updateUserName", width: 120 },
...@@ -61,8 +63,8 @@ const tableInfo = ref({ ...@@ -61,8 +63,8 @@ const tableInfo = ref({
61 label: "结果状态", field: "confirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 63 label: "结果状态", field: "confirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
62 return filterVal(scope.row.confirmStatus, 'confirmStatus'); 64 return filterVal(scope.row.confirmStatus, 'confirmStatus');
63 }, tagType: (scope) => { 65 }, tagType: (scope) => {
64 return scope.row.confirmStatus=='Y'?'success':'warning'; 66 return scope.row.confirmStatus == 'Y' ? 'success' : 'warning';
65 }, 67 }
66 }, 68 },
67 ], 69 ],
68 data: [], 70 data: [],
...@@ -73,10 +75,10 @@ const tableInfo = ref({ ...@@ -73,10 +75,10 @@ const tableInfo = ref({
73 width: 280, 75 width: 280,
74 btns: (scope) => { 76 btns: (scope) => {
75 let row = scope.row, btnArr: any = [ 77 let row = scope.row, btnArr: any = [
76 { label: "手动执行", value: "run" }, 78 { label: "手动执行", value: "run", disabled: row.status != 'Y' && row.status != 'E' },
77 { label: "编辑", value: "edit" }, 79 { label: "编辑", value: "edit", disabled: row.status != 'Y' && row.status != 'E' },
78 { label: "日志", value: "log" }, 80 { label: "日志", value: "log" },
79 { label: "删除", value: "delete" } 81 { label: "删除", value: "delete", disabled: row.status != 'Y' && row.status != 'E' }
80 ]; 82 ];
81 if (row.confirmStatus == 'Y') { 83 if (row.confirmStatus == 'Y') {
82 btnArr.splice(0, 0, { label: "结果修改", value: "modify" }); 84 btnArr.splice(0, 0, { label: "结果修改", value: "modify" });
...@@ -111,7 +113,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -111,7 +113,7 @@ const tableBtnClick = (scope, btn) => {
111 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") { 113 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") {
112 toPath(type); 114 toPath(type);
113 } else if (type == 'run') { 115 } else if (type == 'run') {
114 const params = {guid: currTableData.value.guid}; 116 const params = { guid: currTableData.value.guid };
115 runExecTask(params).then((res: any) => { 117 runExecTask(params).then((res: any) => {
116 if (res.code == proxy.$passCode) { 118 if (res.code == proxy.$passCode) {
117 getTableData(); 119 getTableData();
......
...@@ -32,6 +32,7 @@ const fullPath = route.fullPath; ...@@ -32,6 +32,7 @@ const fullPath = route.fullPath;
32 const assetStore = useDataAssetStore(); 32 const assetStore = useDataAssetStore();
33 33
34 const loading = ref(false); 34 const loading = ref(false);
35 const showBtns = ref(true);
35 const gradeList = ref([]); 36 const gradeList = ref([]);
36 const treeData = ref([ 37 const treeData = ref([
37 { 38 {
...@@ -376,6 +377,7 @@ const getTaskDetail = (param) => { ...@@ -376,6 +377,7 @@ const getTaskDetail = (param) => {
376 loading.value = false; 377 loading.value = false;
377 if (res.code == proxy.$passCode) { 378 if (res.code == proxy.$passCode) {
378 taskDetail.value = res.data || {}; 379 taskDetail.value = res.data || {};
380 taskDetail.value.confirmStatus != 'Y' && (showBtns.value = true);
379 getFieldCount() 381 getFieldCount()
380 getSheetFieldList({ type: 1 }); 382 getSheetFieldList({ type: 1 });
381 getFieldTree() 383 getFieldTree()
...@@ -795,6 +797,7 @@ onActivated(() => { ...@@ -795,6 +797,7 @@ onActivated(() => {
795 797
796 onBeforeMount(() => { 798 onBeforeMount(() => {
797 if (route.query.type == 'log') { 799 if (route.query.type == 'log') {
800 showBtns.value = false;
798 getTaskDetail({ guid: route.query.guid, execGuid: route.query.execGuid }); 801 getTaskDetail({ guid: route.query.guid, execGuid: route.query.execGuid });
799 } else { 802 } else {
800 getTaskDetail({ guid: route.query.guid }); 803 getTaskDetail({ guid: route.query.guid });
...@@ -813,7 +816,7 @@ onMounted(() => { ...@@ -813,7 +816,7 @@ onMounted(() => {
813 <template> 816 <template>
814 <div class="container_wrap full flex" v-loading="loading"> 817 <div class="container_wrap full flex" v-loading="loading">
815 <div class="main_wrap full"> 818 <div class="main_wrap full">
816 <div class="content_main panel"> 819 <div class="content_main panel" :class="{ full: !showBtns }">
817 <div class="template_panel" :class="{ active: !titleClose }"> 820 <div class="template_panel" :class="{ active: !titleClose }">
818 <div class="panel_title"> 821 <div class="panel_title">
819 <div class="title_wrap"> 822 <div class="title_wrap">
...@@ -958,7 +961,7 @@ onMounted(() => { ...@@ -958,7 +961,7 @@ onMounted(() => {
958 </div> 961 </div>
959 </div> 962 </div>
960 </div> 963 </div>
961 <div class="tool_btns"> 964 <div class="tool_btns" v-if="showBtns">
962 <div class="btns"> 965 <div class="btns">
963 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button> 966 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button>
964 <el-button type="primary" @click="btnClick({ value: 'confirm' })">确认变更</el-button> 967 <el-button type="primary" @click="btnClick({ value: 'confirm' })">确认变更</el-button>
...@@ -1034,6 +1037,10 @@ onMounted(() => { ...@@ -1034,6 +1037,10 @@ onMounted(() => {
1034 padding: 0 16px; 1037 padding: 0 16px;
1035 } 1038 }
1036 1039
1040 &.full {
1041 height: 100%;
1042 }
1043
1037 .template_panel { 1044 .template_panel {
1038 padding: 0 16px; 1045 padding: 0 16px;
1039 height: 40px; 1046 height: 40px;
......
...@@ -52,6 +52,8 @@ const tableInfo = ref({ ...@@ -52,6 +52,8 @@ const tableInfo = ref({
52 { 52 {
53 label: "结果状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 53 label: "结果状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
54 return filterVal(scope.row.status, 'confirmStatus'); 54 return filterVal(scope.row.status, 'confirmStatus');
55 }, tagType: (scope) => {
56 return scope.row.confirmStatus == 'Y' ? 'success' : 'warning';
55 } 57 }
56 }, 58 },
57 ], 59 ],
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!