|
@@ -3,7 +3,7 @@ import {
|
|
|
getNextUser,
|
|
|
queryFlowDataList,
|
|
|
queryFlowRecord,
|
|
|
- submitFlow,
|
|
|
+ audit,
|
|
|
} from "@/api/flow";
|
|
|
import {
|
|
|
ComponentNameClass,
|
|
@@ -28,7 +28,16 @@ let currentRow: any = {};
|
|
|
const openCheckDrawer = (row) => {
|
|
|
dialogVisible.value = true;
|
|
|
currentRow = row;
|
|
|
+ userList.value = []
|
|
|
+ getNextUser("2", row.id).then((res) => {
|
|
|
+ if(res.data){
|
|
|
+ showLabel.value = res.data.roleName
|
|
|
+ userList.value = res.data.users
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
+const userList = ref([])
|
|
|
+const showLabel = ref(null)
|
|
|
|
|
|
defineExpose({
|
|
|
openCheckDrawer,
|
|
@@ -44,12 +53,20 @@ const allComponents = shallowReactive({
|
|
|
RouteFlowComService,
|
|
|
});
|
|
|
|
|
|
+const auditObj =(params) =>{
|
|
|
+ audit(params).then((res)=>{
|
|
|
+ emits("finish", 1);
|
|
|
+ dialogVisible.value = false;
|
|
|
+ })
|
|
|
+}
|
|
|
const toPass = async () => {
|
|
|
- dialogVisible.value = false;
|
|
|
+ const params = {taskId: currentRow.id,message: currentRow.message,state: 1,nextUsers: currentRow.nextUsers}
|
|
|
+ auditObj(params)
|
|
|
};
|
|
|
|
|
|
const disAgree = async () => {
|
|
|
- dialogVisible.value = false;
|
|
|
+ const params = {taskId: currentRow.id,message: currentRow.message,state: -1,nextUsers: currentRow.nextUsers}
|
|
|
+ auditObj(params)
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -78,7 +95,7 @@ const disAgree = async () => {
|
|
|
:row="currentRow"
|
|
|
/>
|
|
|
</el-collapse-item>
|
|
|
- <el-collapse-item title="Feedback" name="2">
|
|
|
+<!-- <el-collapse-item title="Feedback" name="2">
|
|
|
<div>
|
|
|
{{ componentName }}
|
|
|
</div>
|
|
@@ -86,8 +103,31 @@ const disAgree = async () => {
|
|
|
Visual feedback: reflect current state by updating or
|
|
|
rearranging elements of the page.
|
|
|
</div>
|
|
|
- </el-collapse-item>
|
|
|
+ </el-collapse-item>-->
|
|
|
</el-collapse>
|
|
|
+ <el-form>
|
|
|
+ <el-form-item :label="showLabel" v-if="showLabel && userList">
|
|
|
+ <el-select
|
|
|
+ v-model="currentRow.nextUsers"
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ placeholder="请选择人员"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-if="userList"
|
|
|
+ v-for="item in userList"
|
|
|
+ :key="item.userName"
|
|
|
+ :label="item.userName"
|
|
|
+ :value="item.userName"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="审核意见">
|
|
|
+ <el-input v-model="currentRow.message"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
</template>
|
|
@@ -95,7 +135,7 @@ const disAgree = async () => {
|
|
|
<div style="flex: auto">
|
|
|
<el-button @click="close">取消</el-button>
|
|
|
<el-button type="primary" @click="toPass">通过</el-button>
|
|
|
- <el-button type="warning" @click="toPass">不同意</el-button>
|
|
|
+ <el-button type="warning" @click="disAgree">不同意</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-drawer>
|