This commit is contained in:
caoqianming 2025-11-07 17:01:17 +08:00
commit 48fd229a69
21 changed files with 1034 additions and 1564 deletions

View File

@ -69,7 +69,7 @@
</template>
<script setup>
import { ref, defineProps, defineEmits, computed, onMounted } from "vue";
import { ref, defineProps, defineEmits, computed, onMounted, watch } from "vue";
const props = defineProps({
multiple: { type: Boolean, default: false },
@ -103,8 +103,25 @@ onMounted(() => {
tableData.value = props.options;
hidePagination.value = true;
}
watch(
() => props.label,
async (newVal) => {
init()
},
{ deep: true, immediate: true }
);
watch(
() => props.modelValue,
async (newVal) => {
init()
},
{ deep: true, immediate: true }
)
if (props.label) {
});
const init = () => {
if (props.label) {
selectLabel.value = props.label;
} else {
if (props.multiple) {
@ -133,7 +150,7 @@ onMounted(() => {
}
}
}
});
}
const isFixOptions = ref(false);
const tableData = ref(null);

View File

@ -105,7 +105,7 @@
</scTable>
</el-main>
</el-container>
<el-drawer :title="titleMap[type] " v-model="limitedVisible" size="50%">
<el-drawer :title="titleMap " v-model="limitedVisible" size="50%">
<el-form
:model="addForm"
:rules="rules"
@ -152,24 +152,14 @@ export default {
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
apiObj: this.$API.ofm.filerecord.list,
selection: [],
checkList: [],
transitions:[],
timeRange: [],
query: {},
editId: null,
isSaving: false,
limitedVisible: false,
limitedWatch: false,
type: "add",
titleMap: {
add: "新增",
edit: "编辑",
show: "查看",
},
titleMap:"档案管理",
//
addForm: {
name: null,
@ -188,16 +178,8 @@ export default {
this.addForm = this.getDefaultForm();
this.limitedVisible = true;
},
handleAdd_outer() {
this.addForm = this.getDefaultForm();
this.type = "add";
this.limitedVisible = true;
this.lending_type = "outer";
this.addForm.is_lending = true;
},
handleCancel() {
this.limitedVisible = false; //
this.lending_type = ""; // lending_type
this.getDefaultForm()//
},
submitHandle() {
@ -260,54 +242,4 @@ export default {
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

View File

@ -1,89 +0,0 @@
<template>
<el-container>
<el-main>
<el-form
:model="addForm"
:rules="rules"
ref="addForm"
label-width="100px"
label-position="left"
>
<el-form-item label="资料名称" prop="name">
<el-input v-model="addForm.name" clearable :disabled="mode==='view'"></el-input>
</el-form-item>
<el-form-item label="档案编号" prop="number">
<el-input v-model="addForm.number" clearable :disabled="mode==='view'"></el-input>
</el-form-item>
<el-form-item label="文件份数" prop="counts">
<el-input v-model="addForm.counts" clearable :disabled="mode==='view'"></el-input>
</el-form-item>
<el-form-item label="存放位置" prop="location">
<el-input v-model="addForm.location" clearable :disabled="mode==='view'"></el-input>
</el-form-item>
<el-form-item label="存档人电话" prop="contacts">
<el-input v-model="addForm.contacts" clearable :disabled="mode==='view'"></el-input>
</el-form-item>
<el-form-item label="接收人(综合办)" prop="reciver" label-width="120px">
<el-input v-model="addForm.reciver" clearable :disabled="mode==='view'"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark" type="textarea">
<el-input v-model="addForm.remark" clearable :disabled="mode==='view'"></el-input>
</el-form-item>
</el-form>
<el-footer v-show="mode!=='show'">
<ticketd_b
:workflow_key="'borrowrecord'"
:title="ticketTitle"
:t_id="addForm.id"
:ticket_="addForm.ticket_"
:submit_b_func="submit_b_func"
:ticket_data="ticket_data"
ref="ticketd_b"
@success="$emit('success')"
@colsed="$emit('closed')"
/>
</el-footer>
</el-main>
<el-aside width="20%" v-if="addForm.ticket_">
<ticketd ::ticket_="addForm.ticket_" @success="$emit('success')"></ticketd>
</el-aside>
</el-container>
</template>
<script>
import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
props: {
mode: { type: String, default: "view" }, // add / edit / view
modelValue: { type: Object, default: () => ({}) },
transitions: { type: Array, default: () => [] },
},
components: {ticketd, ticketd_b},
emits: ["update:modelValue", "submit", "cancel"],
data(){
return {
addForm: { ...this.modelValue },
ticketTitle: "档案申请",
rules:{
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
},
}
},
methods:{
async submit_b_func() {
let that = this;
this.ticketTitle = `${this.addForm.name}-档案申请`
if(that.mode == "add") {
let res = await that.$API.ofm.filerecord.create.req(that.addForm);
that.addForm.id = res.id;
} else if (that.mode == "edit") {
await that.$API.ofm.filerecord.update.req(that.addForm.id, that.addForm);
}
},
},
}
</script>

View File

@ -6,7 +6,6 @@
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-auth="'fileborrow.create'"
></el-button>
</div>
<div class="right-panel">
@ -61,23 +60,22 @@
prop="return_date"
min-width="100"
></el-table-column>
<el-table-column label="所在节点" min-width="60">
<el-table-column label="审批信息" width="200">
<template #default="scope">
{{scope.row.ticket_.state_.name}}
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="60">
<template #default="scope">
{{statusOptions[scope.row.ticket_.state_.type]}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="borrowEidt(scope.row)"
@click="borrowShow(scope.row)"
v-auth="'fileborrow.update'"
>详情
</el-button>
@ -100,16 +98,18 @@
</scTable>
</el-main>
</el-container>
<el-drawer :title="titleMap[type] "
<el-drawer
title="档案管理"
v-model="limitedVisible"
:destroy-on-close="true"
direction="rtl"
size="70%">
<div style="display: flex; height: calc(100% - 60px);">
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
<borrowlForm
:mode="type"
v-model="addForm"
:mode="mode"
:t_id="t_id"
@success="()=>{handleQuery(); limitedVisible = false}"
@closed="limitedVisible = false"
/>
@ -120,102 +120,37 @@
<script>
import borrowlForm from "./borrowfile_form.vue";
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
export default {
components: { borrowlForm },
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
actStateEnum, interveneTypeEnum,
apiObj: this.$API.ofm.borrow.list,
selection: [],
checkList: [],
fileList: [],
transitions:[],
timeRange: [],
query: {},
editId: null,
isSaving: false,
limitedVisible: false,
limitedWatch: false,
type: "add",
titleMap: {
add: "新增",
edit: "编辑",
show: "查看",
},
statusOptions:{
0: "审批中",
1: "初始中",
2: "已完成",
},
//
addForm: {
borrow_file: [],
number: null,
counts: null,
location: null,
contacts: null,
ticket_: null,
reciver: "",
remark: [],
},
mode: "show",
t_id: null,
};
},
mounted(){
let that = this;
that.getInit();
},
methods: {
getInit() {
let that = this;
if(this.addForm.ticket_!==null){
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
that.transitions = res;
})
}else{
that.$API.wf.workflow.initkey.req("borrowrecord").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
},
handleAdd() {
this.type = "add";
this.addForm = this.getDefaultForm();
this.mode = "add";
this.t_id = null;
this.limitedVisible = true;
},
getDefaultForm(){
return {
borrow_file: [],
number: null,
counts: null,
location: null,
contacts: null,
ticket_:null,
reciver: "",
remark: [],
}
},
//
borrowEidt(row) {
this.type = "view";
this.editId = row.id;
borrowShow(row) {
this.mode = "show";
this.t_id = row.id;
this.limitedVisible = true;
this.addForm = Object.assign({}, row);
},
async borrowDel(row) {
var id = row.id;
var res = await this.$API.ofm.borrow.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
this.$refs.table.refresh();
this.$message.success("删除成功");
},
//
handleQuery() {

View File

@ -9,17 +9,21 @@
label-position="left"
>
<el-form-item label="档案名称">
<el-select v-model="addForm.borrow_file" multiple placeholder="请选择档案" clearable style="width: 300px;">
<el-option
v-for="item in fileList"
:key="item.id"
:value="item.id"
:disabled="localMode ==='view'"
:label="item.name"></el-option>
</el-select>
<xtSelect
:apiObj="apiObjM2"
:multiple = "true"
v-model:obj = "addForm.borrow_file_"
v-model = "addForm.borrow_file"
style="width: 300px;"
placeholder="选择档案名称"
>
<el-table-column label="档案编号" prop="number"></el-table-column>
<el-table-column label="档案名称" prop="name"></el-table-column>
</xtSelect>
</el-form-item>
<el-form-item label="申请人电话" prop="contacts">
<el-input v-model="addForm.contacts" clearable style="width: 300px;" :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.contacts" clearable style="width: 300px;" :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="借阅时间" prop="borrow_date">
<el-date-picker
@ -28,7 +32,7 @@
placeholder="选择日期时间"
align="right"
value-format="YYYY-MM-DD"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
>
</el-date-picker>
</el-form-item>
@ -42,7 +46,7 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="用途" prop="remark" :disabled="localMode ==='view'">
<el-form-item label="用途" prop="remark" :disabled="localMode ==='show'">
<el-checkbox-group v-model="addForm.remark">
<el-checkbox label="借阅"></el-checkbox>
<el-checkbox label="复印"></el-checkbox>
@ -51,14 +55,14 @@
</el-form-item>
</el-form>
<el-footer v-show="mode!=='show'">
<el-footer>
<ticketd_b
:workflow_key="'borrowrecord'"
:title="ticketTitle"
:t_id="addForm.id"
:ticket_="addForm.ticket_"
:ticket_data="ticket_data"
:submit_b_func="submit"
:submit_b_func="submit_b_func"
ref="ticketd_b"
@success="$emit('success')"
/>
@ -81,12 +85,10 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from "@/views/wf/ticketd.vue";
export default {
name: "index",
props: {
mode: {
type: String, default: "view"
type: String, default: "show"
},
modelValue: { type: Object, default: () => ({}) },
t_id: {
type: String,
default: null
@ -99,14 +101,10 @@ export default {
data() {
return {
ticketTitle: "档案借阅",
addForm: {
ticket_: {
state_: { type: '' }
},
borrow_file: [],
...this.modelValue },
addForm: {},
localMode : this.mode,
query: {},
apiObjM2: this.$API.ofm.filerecord.list,
fileList: [],
ticket_data: {},
rules: {
@ -117,14 +115,10 @@ export default {
};
},
mounted(){
this.getFileList().then(() => {
console.log('fileList:', this.fileList)
console.log('addForm.borrow_file:', this.addForm.borrow_file)
});
if (this.addForm.ticket_?.state_.type===1){
this.localMode = 'edit'
let that = this;
if (that.t_id){
this.getTid();
};
this.getTid();
},
watch: {
addForm: {
@ -137,18 +131,13 @@ export default {
}
},
methods: {
async submit() {
async submit_b_func() {
let that = this;
let res = null;
if (that.localMode === "add") {
res = await that.$API.ofm.borrow.create.req(that.addForm);
let res = await that.$API.ofm.borrow.create.req(that.addForm);
that.addForm.id = res.id;
} else if (that.localMode === "edit") {
res = await that.$API.ofm.borrow.update.req(
that.addForm.id,
that.addForm
);
await that.$API.ofm.borrow.update.req(that.addForm.id, that.addForm);
}
},
getFileList() {
@ -173,54 +162,3 @@ export default {
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

View File

@ -68,7 +68,7 @@
</el-container>
<el-drawer title="会议室预定" v-model="limitedVisible" :size="'80%'" destroy-on-close>
<bookingDialog
v-model="limitedVisible"
v-if="limitedVisible"
:mode="mode"
:t_id="t_id"
:bookingIitem="bookingIitem"
@ -115,6 +115,8 @@ export default {
//
handleAdd() {
this.mode = "add";
this.t_id = null;
this.bookingIitem = {};
this.limitedVisible = true;
},
handleCancel() {

View File

@ -6,7 +6,6 @@
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-auth="'publicity.create'"
></el-button>
</div>
</el-header>
@ -68,195 +67,88 @@
prop="dept_opinion_review"
min-width="100"
></el-table-column>
<el-table-column label="所在节点" min-width="60">
<el-table-column label="审批信息" width="200">
<template #default="scope">
{{scope.row.ticket_.state_.name}}
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="60">
<template #default="scope">
{{statusOptions[scope.row.ticket_.state_.type]}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="publicityEdit(scope.row)"
v-auth="'publicity.update'"
@click="publicityShow(scope.row)"
>详情
</el-button>
<!-- <el-popconfirm
<el-popconfirm
title="确定删除吗?"
@confirm="publicityDel(scope.row)"
@confirm="handleDel(scope.row)"
>
<template #reference>
<el-button
link
size="small"
type="danger"
v-auth="'vehicle.delete'"
v-auth="'publicity.delete'"
>删除</el-button
>
</template>
</el-popconfirm> -->
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-drawer :title="titleMap[type] " v-model="limitedVisible" direction="rtl" size="70%">
<el-drawer title="宣传报道" v-model="limitedVisible" direction="rtl" size="70%">
<div style="display: flex; height: calc(100% - 60px);">
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
<publicity
v-if="limitedVisible"
:mode="type"
:modelValue="addForm"
:transitions="transitions"
:mode="mode"
:t_id="t_id"
@success="()=>{handleQuery(); limitedVisible = false}"
@closed="clearState"
@submit="savePublicity"
/>
</div>
</div>
</el-drawer>
</template>
<script>
import publicity from "./publicityForm.vue";
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
export default {
components: {publicity},
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
apiObj: this.$API.ofm.publicity.list,
transitions:[],
timeRange: [],
actStateEnum, interveneTypeEnum,
query: {},
isSaving: false,
limitedVisible: false,
limitedWatch: false,
type: "add",
titleMap: {
add: "新增",
edit: "编辑",
show: "查看",
},
statusOptions:{
0: "审批中",
1: "初始中",
2: "已完成",
},
//
addForm: {
number: null,
title: null,
participants: null,
department: null,
pfile: '',
level: null,
content: [],
other_content: '',
channel: [],
other_channel: null,
report_purpose: null,
report_name: null,
review:null,
dept_opinion: [],
dept_opinion_review: null,
publicity_opinion: null,
ticket_: null,
},
mode: "show",
t_id: null,
};
},
mounted(){
let that = this;
that.getInit();
},
methods: {
//
//
getInit() {
let that = this;
if(this.addForm.ticket_!==null){
this.$API.wf.ticket.ticketTransitions.req(this.addForm.ticket_).then((res) => {
that.transitions = res;
})
}else{
that.$API.wf.workflow.initkey.req("publicity").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
},
clearState(){
this.type = ' ';
this.addForm = this.getDefaultForm();
this.limitedVisible = false;
},
handleAdd() {
this.type = "add";
this.addForm = this.getDefaultForm();
this.$nextTick(()=>{
this.limitedVisible = true;
})
this.mode = "add";
this.t_id = null;
this.limitedVisible = true;
},
getDefaultForm(){
return {
number: null,
title: null,
participants: null,
pub_dept: null,
pfile: '',
level: null,
content: [],
other_content: '',
channel: [],
other_channel: null,
report_purpose: null,
report_name: null,
review:null,
dept_opinion: [],
dept_opinion_review: null,
publicity_opinion: null,
ticket_: null,
}
publicityShow(row) {
this.mode = "show";
this.t_id = row.id;
this.limitedVisible = true;
},
//
publicityEdit(row) {
this.type = "view";
this.addForm = Object.assign({}, row);
this.$nextTick(()=>{
this.limitedVisible = true;
})
},
async publicityDel(row) {
async handleDel(row) {
var id = row.id;
var res = await this.$API.ofm.publicity.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
},
savePublicity(){
this.isSaving = true;
this.$API.ofm.publicity.update.req(this.addForm.id, this.addForm).then((res) => {
this.isSaving = false;
if (res.err_code) {
this.$message.error(res.err_msg);
} else {
this.$message.success("更新成功");
// this.limitedVisible = false;
this.$refs.table.refresh();
}
});
await this.$API.ofm.publicity.delete.req(id);
this.$refs.table.refresh();
this.$message.success("删除成功");
},
//
handleQuery() {
@ -266,54 +158,5 @@ export default {
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

View File

@ -9,35 +9,35 @@
label-position="left"
>
<el-form-item label="送审稿件标题" prop="title">
<el-input v-model="addForm.title" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.title" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="文件内容">
<sc-upload-file
v-model="addForm.pfile"
:multiple="false"
:limit="1"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
@success = "fileUPSuccess"
>
<el-button type="primary" icon="el-icon-upload" :disabled="localMode ==='view'"> </el-button>
<el-button type="primary" icon="el-icon-upload" :disabled="localMode ==='show'"> </el-button>
</sc-upload-file>
</el-form-item>
<el-form-item label="所有撰稿人" prop="participants">
<el-input v-model="addForm.participants" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.participants" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="部室/研究院" prop="pub_dept">
<el-input v-model="addForm.pub_dept" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.pub_dept" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="第一撰稿人涉密等级" prop="level">
<el-radio-group v-model="addForm.level" :disabled="localMode ==='view'">
<el-radio-group v-model="addForm.level" :disabled="localMode ==='show'">
<el-radio label="重要"></el-radio>
<el-radio label="一般"></el-radio>
<el-radio label="非涉密"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="稿件内容涉及" prop="content">
<el-checkbox-group v-model="addForm.content" :disabled="localMode ==='view'">
<el-checkbox-group v-model="addForm.content" :disabled="localMode ==='show'">
<el-checkbox label="武器装备科研生产综合事项"></el-checkbox>
<el-checkbox label="其他"></el-checkbox>
</el-checkbox-group>
@ -47,14 +47,14 @@
placeholder = "请输入名称"
size = "small"
style="margin-top: 10;"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
></el-input>
</el-form-item>
<el-form-item label="宣传报道目的" prop="report_purpose">
<el-input v-model="addForm.report_purpose" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.report_purpose" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="宣传渠道" prop="channel">
<el-checkbox-group v-model="addForm.channel" :disabled="localMode ==='view'">
<el-checkbox-group v-model="addForm.channel" :disabled="localMode ==='show'">
<el-checkbox label="互联网"></el-checkbox>
<el-checkbox label="信息平台"></el-checkbox>
<el-checkbox label="官微"></el-checkbox>
@ -67,42 +67,44 @@
placeholder = "请输入渠道名称"
size = "small"
style="margin-top: 10;"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
></el-input>
</el-form-item>
<el-form-item label="第一撰稿人自审" prop="review">
<el-radio-group v-model="addForm.review" :disabled="localMode ==='view'">
<el-radio-group v-model="addForm.review" :disabled="localMode ==='show'">
<el-radio label="内容不涉及国家秘密和商业秘密,申请公开"></el-radio>
<el-radio label="内容不涉及国家秘密、但涉及商业秘密,申请受控公开"></el-radio>
<el-radio label="内容涉及国家秘密,申请按涉密渠道发布"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="所在部室/研究院定密意见" prop="dept_opinion" v-if="addForm.ticket_?.state_?.name === '部门领导审批'">
<el-form-item label="所在部室/研究院定密意见" prop="dept_opinion" v-if="['部门领导审批', '总经理审批', '结束'].includes(addForm.ticket_?.state_?.name)">
<div class="dept-opinion-wrap">
<div>
<el-checkbox-group v-model="ticket_data.dept_opinion" style="display: inline;">
<el-checkbox label="不符合定密要求"></el-checkbox>
</el-checkbox-group>
<span>应做</span>
<el-checkbox-group v-model="ticket_data.dept_opinion" style="display: inline;">
<el-checkbox label="公开"></el-checkbox>
<el-checkbox label="受控"></el-checkbox>
</el-checkbox-group>
<el-radio-group v-model="addForm.dept_opinion" style="display: inline;" :disabled="addForm.ticket_?.state_?.name === '总经理审批'">
<el-radio label="不符合定密要求">不符合定密要求</el-radio>
<el-radio label="同意内容为涉密事项">同意内容为涉密事项</el-radio>
</el-radio-group>
</div>
<!-- 根据选择显示不同的选项 -->
<div v-if="addForm.dept_opinion === '不符合定密要求'" style="margin-top: 8px;">
<span>应做</span>
<el-radio-group v-model="disposalMethod" style="display: inline; margin-left: 5px;" :disabled="addForm.ticket_?.state_?.name === '总经理审批'">
<el-radio label="公开">公开</el-radio>
<el-radio label="受控">受控</el-radio>
</el-radio-group>
<span>处理</span>
</div>
<div style="margin-top: 8px;">
<el-checkbox-group v-model="ticket_data.dept_opinion" style="display: inline;">
<el-checkbox label="同意内容为涉密事项"></el-checkbox>
</el-checkbox-group>
<span>涉密等级为</span>
<el-checkbox-group v-model="ticket_data.dept_opinion" style="display: inline;">
<el-checkbox label="机密"></el-checkbox>
<el-checkbox label="秘密"></el-checkbox>
</el-checkbox-group>
<div v-if="addForm.dept_opinion === '同意内容为涉密事项'" style="margin-top: 8px;">
<span>涉密等级为</span>
<el-radio-group v-model="addForm.secret_level" style="display: inline; margin-left: 5px;">
<el-radio label="机密">机密</el-radio>
<el-radio label="秘密">秘密</el-radio>
</el-radio-group>
<span>保密期限解密时间或解密条件</span>
<el-input
v-model="ticket_data.secret_period"
v-model="addForm.secret_period"
placeholder="请输入期限"
style="width: 200px; margin-left: 5px;"
size="small"
@ -111,15 +113,15 @@
</div>
</div>
</el-form-item>
<el-form-item label="所在部室/研究院审查意见" prop="dept_opinion_review" v-if="addForm.ticket_?.state_?.name === '总经理审批'">
<el-radio-group v-model="ticket_data.dept_opinion_review">
<el-form-item label="所在部室/研究院审查意见" prop="dept_opinion_review" v-if="['部门领导审批', '总经理审批', '结束'].includes(addForm.ticket_?.state_?.name)">
<el-radio-group v-model="addForm.dept_opinion_review" :disabled="addForm.ticket_?.state_?.name === '总经理审批'">
<el-radio label="内容不涉及国家秘密和商业秘密,同意公开"></el-radio>
<el-radio label="内容不涉及国家秘密、但涉及商业秘密,同意受控公开"></el-radio>
<el-radio label="内容涉及国家秘密,同意按涉密渠道发布"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="宣传统战部审查意见" prop="publicity_opinion" v-if="addForm.ticket_?.state_?.name === '总经理审批'">
<el-radio-group v-model="ticket_data.publicity_opinion">
<el-form-item label="宣传统战部审查意见" prop="publicity_opinion" v-if="['总经理审批', '结束'].includes(addForm.ticket_?.state_?.name)">
<el-radio-group v-model="addForm.publicity_opinion">
<el-radio label="同意公开宣传报道"></el-radio>
<el-radio label="同意受控报道"></el-radio>
<el-radio label="同意按涉密渠道宣传报道"></el-radio>
@ -127,7 +129,7 @@
</el-radio-group>
</el-form-item>
</el-form>
<el-footer v-show="mode!=='show'">
<el-footer>
<ticketd_b
:workflow_key="'publicity'"
:title="ticketTitle"
@ -137,41 +139,41 @@
:submit_b_func="submit_b_func"
ref="ticketd_b"
@success="$emit('success')"
@colsed="$emit('closed')"/>
/>
</el-footer>
</el-main>
<el-aside v-if="addForm.ticket">
<ticketd
:ticket_="addForm.ticket_"
:ticket_data="ticket_data"
@success="$emit('success')"
style="margin-top: 20px;"
/>
:ticket_="addForm.ticket_"
:ticket_data="ticket_data"
@success="$emit('success')"
style="margin-top: 20px;"
/>
</el-aside>
</el-container>
</template>
<script>
import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
name: "index",
props: {
mode: {
type: String, default: "view"
},
modelValue: { type: Object, default: () => ({})},
transitions: { type: Array, default: () => [] },
mode: {
type: String, default: "show"
}, // add / edit / show
t_id: {
type: String, default: null
},
},
components: {
ticketd, ticketd_b
},
emits: ["update:modelValue", "submit", "cancel"],
data(){
return {
ticketTitle: "宣传报道",
ticket_data: {},
addForm:{},
localMode : this.mode,
rules: {
file_name: [
@ -180,31 +182,54 @@ export default {
},
}
},
computed: {
addForm: {
get() {
return this.modelValue;
},
set(val) {
this.$emit("update:modelValue", val);
},
},
},
mounted() {
this.getTid();
if (this.addForm.ticket_?.state_.type===1){
this.localMode = 'edit'
let that = this;
if (that.t_id) {
that.getTid();
};
},
watch: {
'addForm.dept_opinion'(val) {
console.log('addForm.dept_opinion 发生变化',val)
this.ticket_data.dept_opinion = val
},
'addForm.secret_period'(val) {
this.ticket_data.secret_period = val
},
'addForm.secret_level'(val) {
this.ticket_data.secret_level = val
},
'addForm.disposal_method'(val) {
console.log('addForm.disposal_method 发生变化',val)
this.ticket_data.disposal_method = val
},
'addForm.dept_opinion_review'(val) {
this.ticket_data.dept_opinion_review = val
},
'addForm.publicity_opinion'(val) {
console.log('addForm.publicity_opinion 发生变化',val)
this.ticket_data.publicity_opinion = val
},
deep:true
},
computed: {
disposalMethod: {
get() {
return this.addForm.disposal_method || '';
},
set(value) {
this.addForm.disposal_method = value;
}
}
},
methods: {
async submit_b_func() {
let that = this;
let res = null;
if (that.localMode === "add") {
res = await that.$API.ofm.publicity.create.req(that.addForm);
let res = await that.$API.ofm.publicity.create.req(that.addForm);
that.addForm.id = res.id;
} else if (that.localMode === "edit"){
res = await that.$API.ofm.publicity.update.req(
await that.$API.ofm.publicity.update.req(
that.addForm.id,
that.addForm
);
@ -227,65 +252,5 @@ export default {
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
.dept-opinion-wrap {
display: flex;
flex-direction: column;
line-height: 1.8;
}
.dept-opinion-wrap .el-checkbox {
margin-right: 6px;
}
</style>

View File

@ -6,14 +6,7 @@
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-auth="'seal.create'"
>内用</el-button>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd_outer"
v-auth="'seal.create'"
>外借</el-button>
>新增</el-button>
</div>
<div class="right-panel">
<el-input
@ -87,34 +80,27 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="所在节点" min-width="60">
<el-table-column label="审批信息" width="200">
<template #default="scope">
{{scope.row.ticket_.state_.name}}
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="60">
<template #default="scope">
{{statusOptions[scope.row.ticket_.state_.type]}}
</template>
</el-table-column>
<el-table-column
label="备注"
prop="reason"
min-width="60"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="sealEidt(scope.row)"
v-auth="'seal.update'"
@click="handleShow(scope.row)"
>详情
</el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="sealDel(scope.row)"
@confirm="handleDel(scope.row)"
>
<template #reference>
<el-button
@ -132,7 +118,7 @@
</el-main>
</el-container>
<el-drawer
:title="drawerTitle[mode]"
title="印章申请"
v-model="limitedVisible"
:destroy-on-close="true"
direction="rtl"
@ -142,8 +128,7 @@
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
<SealForm
:mode="mode"
v-model="addForm"
:lending_type="lending_type"
:t_id="t_id"
@success="()=>{handleQuery(); limitedVisible = false}"
@closed="limitedVisible = false"
/>
@ -152,153 +137,37 @@
</el-drawer>
</template>
<script>
import SealForm from "./sealForm.vue";
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
export default {
components: { SealForm},
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
actStateEnum, interveneTypeEnum,
apiObj: this.$API.ofm.lendingseal.list,
selection: [],
checkList: [],
fileList: [],
transitions:[],
timeRange: [],
lending_type: "",
query: {},
editId: null,
isSaving: false,
limitedVisible: false,
mode: "add",
drawerTitle: {
add: "新增印章使用",
edit: "审批流",
view: "查看印章使用",
},
statusOptions:{
0: "审批中",
1: "初始中",
2: "已完成",
},
currentRow: null,
//
addForm: {
seal: [],
create_by_name: "",
seal_other: "",
filename: "",
file: "",
file_count: "",
is_lending: false,
contacts: "",
lending_date: null,
return_date: null,
actual_return_date: null,
reason: "",
ticket_:null
},
mode: "show",
t_id: null,
};
},
mounted(){
let that = this;
that.getInit();
},
methods: {
//
//
getInit() {
let that = this;
if(this.addForm.ticket_!==null){
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
that.transitions = res;
})
}else{
that.$API.wf.workflow.initkey.req("seal").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
},
handleAdd() {
this.mode = "add";
this.addForm = this.getDefaultForm();
this.lending_type = "";
this.t_id = null;
this.limitedVisible = true;
},
handleAdd_outer() {
this.addForm = this.getDefaultForm();
this.mode = "add";
handleShow(row) {
this.mode = "show";
this.t_id = row.id;
this.limitedVisible = true;
this.lending_type = "outer";
this.addForm.is_lending = true;
},
handleCancel() {
this.limitedVisible = false; //
this.lending_type = ""; // lending_type
this.getDefaultForm()//
},
getDefaultForm(){
return {
seal: [],
create_by_name: "",
seal_other: "",
filename: "",
file: "",
file_count: "",
is_lending: false,
contacts: "",
lending_date: null,
return_date: null,
actual_return_date: null,
reason: "",
ticket_:null
}
},
//
sealEidt(row) {
this.mode = "view";
this.editId = row.id;
this.limitedVisible = true;
if (row.is_lending) {
this.lending_type = "outer";
} else {
this.lending_type = "";
}
this.addForm = Object.assign({}, row);
if (row.lending_date && row.return_date) {
this.timeRange = [row.lending_date, row.return_date];
} else {
this.timeRange = [];
}
if (Array.isArray(row.seal)) {
let knownSeals = ["公章", "法人章", "合同章", "财务章"];
let otherItem = row.seal.filter((item) => !knownSeals.includes(item));
this.addForm.seal = row.seal.filter((item) => knownSeals.includes(item));
if (otherItem.length > 0) {
this.addForm.seal.push("其他");
this.addForm.seal_other = otherItem.join(",");
}else{
this.addForm.seal_other = "";
}
} else {
this.addForm.seal = [];
}
this.addForm.is_lending = true;
},
async sealDel(row) {
async handleDel(row) {
var id = row.id;
var res = await this.$API.ofm.lendingseal.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
await this.$API.ofm.lendingseal.delete.req(id);
this.$refs.table.refresh();
this.$message.success("删除成功");
},
//
handleQuery() {
@ -308,54 +177,4 @@ export default {
},
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

View File

@ -3,14 +3,14 @@
<el-main>
<el-form :model="localForm" label-width="100px" label-position="left" :rules="rules">
<el-form-item label="文件名称" prop="filename">
<el-input v-model="localForm.filename" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="localForm.filename" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="contacts">
<el-input v-model="localForm.contacts" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="localForm.contacts" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="印章类型">
<el-checkbox-group v-model="localForm.seal" :disabled="localMode ==='view'">
<el-checkbox-group v-model="localForm.seal" :disabled="localMode ==='show'">
<el-checkbox label="公章"></el-checkbox>
<el-checkbox label="法人章"></el-checkbox>
<el-checkbox label="合同章"></el-checkbox>
@ -18,29 +18,35 @@
<el-checkbox label="其他"></el-checkbox>
</el-checkbox-group>
<el-input
v-if="localForm.seal.includes('其他')"
v-if="localForm.seal && localForm.seal.includes('其他')"
v-model="localForm.seal_other"
placeholder = "请输入印章名称"
size = "small"
style="margin-top: 10;"
></el-input>
</el-form-item>
<template v-if="lending_type === 'outer'">
<el-form-item label="借用日期">
<el-date-picker
v-model="timeRange"
type="daterange"
align="right"
value-format="YYYY-MM-DD"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:disabled="localMode ==='view'"
@change="handleDateChange">
</el-date-picker>
</el-form-item>
<el-form-item label="是否借出">
<el-radio-group v-model="localForm.is_lending" :disabled="localMode ==='show'">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
<div style="margin-top: 10px; width: 100%;">
<el-date-picker v-if="localForm.is_lending===true"
v-model="timeRange"
type="daterange"
align="right"
value-format="YYYY-MM-DD"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:disabled="localMode ==='show'"
@change="handleDateChange">
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="实际归还日期" v-if="localForm.ticket_?.state_?.name=='借用中'">
<el-form-item label="实际归还日期"
v-if="['借用中', '结束'].includes(localForm.ticket_?.state_?.name)">
<el-date-picker
v-model="localForm.actual_return_date"
type="date"
@ -48,6 +54,7 @@
value-format="YYYY-MM-DD"
unlink-panels
placeholder="选择日期"
:disabled="localForm.ticket_?.state_?.name !== '借用中'"
>
</el-date-picker>
</el-form-item>
@ -57,11 +64,9 @@
placeholder="请输入借用理由"
v-model="localForm.reason"
rows = '3'
:disabled="localMode ==='view'">
:disabled="localMode ==='show'">
</el-input>
</el-form-item>
</template>
<el-form-item label="文件内容">
<sc-upload-file
v-model="localForm.file"
@ -69,7 +74,7 @@
:limit="1"
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
@success = "fileUPSuccess"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
>
<el-button type="primary" icon="el-icon-upload"> </el-button>
</sc-upload-file>
@ -80,17 +85,16 @@
:min="0"
:step="1"
controls-position="right"
:disabled="localMode ==='view'"></el-input-number>
:disabled="localMode ==='show'"></el-input-number>
</el-form-item>
</el-form>
<el-footer v-show="localMode!=='show'">
<el-footer>
<ticketd_b
v-if="ticketview"
:workflow_key="'seal'"
:title="ticketTitle"
:t_id="localForm.id"
:ticket_="localForm.ticket_"
:ticket_data="ticket_data"
:ticket_="localForm.ticket_"
:submit_b_func="submit_b_func"
ref="ticketd_b"
@success="$emit('success')"
@ -99,11 +103,10 @@
</el-main>
<el-aside v-if="localForm.ticket_">
<ticketd
:ticket_="localForm.ticket_"
:ticket_data="ticket_data"
@success="$emit('success')"
style="margin-top: 20px;"
/>
:ticket_="localForm.ticket_"
@success="$emit('success')"
style="margin-top: 20px;"
></ticketd>
</el-aside>
</el-container>
</template>
@ -113,64 +116,37 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
props: {
mode: { type: String, default: "view" }, // add / edit / view
lending_type: { type: String, default: "outer" }, // inner / outer
modelValue: { type: Object, default: () => ({}) },
mode: {
type: String, default: "show"
}, // add / edit / show
t_id: {
type: String,
default: null
},
},
type: String, default: null
},
},
components: {ticketd, ticketd_b },
emits: ["update:modelValue", "submit", "cancel"],
data() {
return {
ticket_data: {},
ticketview: false,
ticketTitle: "用印申请",
localForm: {
ticket_: {
state_: { type: '' }
},
...this.modelValue },
localMode : this.mode,
ticket_data: {},
localForm: {},
localMode: this.mode,
timeRange: [],
rules: {
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
},
};
},
mounted() {
// console.log('--------this.t_id----------',this.t_id)
this.getTid();
this.initTimeRange();
if (this.localForm.ticket_?.state_.type===1){
this.localMode = 'edit'
}
if(this.lending_type === 'outer'){
this.ticket_data = {
is_lending: true
};
}else{
this.ticket_data={is_lending: false}
};
mounted() {
let that = this;
if (that.t_id) {
that.getTid();
}
},
watch: {
'localForm.actual_return_date'(val) {
this.ticket_data.actual_return_date = val
},
},
computed: {
addForm: {
get() {
return this.modelValue;
},
set(val) {
this.$emit("update:modelValue", val);
},
},
},
methods: {
handleDateChange(val) {
this.localForm.lending_date = val?.[0] || null
@ -178,10 +154,8 @@ export default {
},
async submit_b_func() {
let that = this;
this.ticketTitle = `${this.localForm.filename}-用印申请`
if(that.localMode == "add") {
let res = await that.$API.ofm.lendingseal.create.req(that.localForm);
that.localForm.id = res.id;
} else if (that.localMode == "edit") {
await that.$API.ofm.lendingseal.update.req(that.localForm.id, that.localForm);
@ -189,18 +163,16 @@ export default {
},
getTid (){
var that = this;
// console.log('----------that--------',that.t_id)
if (that.t_id) {
that.$API.ofm.lendingseal.item.req(that.t_id).then(res=>{
that.localForm = res;
// console.log('----------ticket_--------',that.localForm.ticket_)
that.ticketview = true;
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
that.localMode = "edit";
}else{
that.localMode = "show";
}
})
if (that.t_id) {
that.$API.ofm.lendingseal.item.req(that.t_id).then(res=>{
that.localForm = res;
that.initTimeRange();
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
that.localMode = "edit";
}else{
that.localMode = "show";
}
})
}
},
initTimeRange() {

View File

@ -80,23 +80,22 @@
prop="actual_km"
min-width="100"
></el-table-column>
<el-table-column label="所在节点" min-width="60">
<el-table-column label="审批信息" width="200">
<template #default="scope">
{{scope.row.ticket_.state_.name}}
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="所在节点" min-width="60">
<template #default="scope">
{{statusOptions[scope.row.ticket_.state_.type]}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="vehicleEidt(scope.row)"
@click="handleShow(scope.row)"
v-auth="'vehicle.update'"
>详情
</el-button>
@ -120,7 +119,7 @@
</el-main>
</el-container>
<el-drawer
:title="drawerTitle[type]"
:title="车辆审批"
v-model="limitedVisible"
:destroy-on-close="true"
direction="rtl"
@ -129,19 +128,18 @@
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
<VehicleForm
:mode="type"
v-model="addForm"
:lending_type="lending_type"
:transitions="transitions"
:t_id="t_id"
@success="()=>{handleQuery(); limitedVisible = false}"
@closed="limitedVisible = false"
/>
</div>
</div>
</div>
</el-drawer>
</template>
<script>
import VehicleForm from "./vehicleForm.vue";
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
export default {
components: {
VehicleForm
@ -149,169 +147,38 @@ export default {
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
actStateEnum, interveneTypeEnum,
apiObj: this.$API.ofm.vehicle.list,
selection: [],
checkList: [],
transitions:[],
drawerTitle: {
add: "新增车辆使用",
edit: "编辑车辆使用",
view: "查看车辆使用",
},
statusOptions:{
0: "审批中",
1: "初始中",
2: "已完成",
},
timeRange: [],
lending_type: "",
choiceOption: [],
query: {},
editId: null,
isSaving: false,
limitedVisible: false,
limitedWatch: false,
type: "add",
//
addForm: {
start_time: null,
end_time: null,
location: null,
via: null,
destination: null,
start_km: null,
end_km: null,
is_city: true,
reason: null,
ticket_:null
},
type: "show",
t_id: null,
};
},
mounted(){
let that = this;
that.getInit();
},
methods: {
getInit() {
let that = this;
if(this.addForm.ticket_!==null){
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
that.transitions = res;
})
}else{
that.$API.wf.workflow.initkey.req("vehicle").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
},
handleAdd() {
this.type = "add";
this.addForm = this.getDefaultForm();
this.t_id = null;
this.limitedVisible = true;
},
getDefaultForm(){
return {
start_time: null,
end_time: null,
location: null,
via: null,
destination: null,
start_km: null,
end_km: null,
is_city: true,
reason: null,
ticket_:null
}
},
//
vehicleEidt(row) {
this.type = "view";
this.editId = row.id;
handleShow(row) {
this.type = "show";
this.t_id = row.id;
this.limitedVisible = true;
this.addForm = Object.assign({}, row);
},
//
saveVehicle() {
this.isSaving = true;
this.$API.ofm.vehicle.update.req(this.addForm.id, this.addForm).then((res) => {
this.isSaving = false;
if (res.err_code) {
this.$message.error(res.err_msg);
} else {
this.$message.success("更新成功");
this.limitedVisible = false;
this.$refs.table.refresh();
}
});
},
async vehicleDel(row) {
var id = row.id;
var res = await this.$API.ofm.vehicle.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
this.$refs.table.refresh();
this.$message.success("删除成功");
},
//
handleQuery() {
this.$refs.table.queryData(this.query);
},
},
}
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

View File

@ -9,29 +9,25 @@
label-position="left"
>
<el-form-item label="用车事由" prop="reason">
<el-input v-model="addForm.reason" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.reason" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="用车范围" prop="is_city">
<el-select v-model="addForm.is_city" placeholder="请选择" :disabled="localMode ==='view'">
<el-option
v-for="item in vehicle_scope"
:key="item.is_city"
:label="item.name"
:value="item.is_city"
/>
</el-select>
<el-radio-group v-model="addForm.is_city" :disabled="localMode ==='show'">
<el-radio :label="true">市内</el-radio>
<el-radio :label="false">市外</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="出发地点" prop="location">
<el-input v-model="addForm.location" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.location" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="途经地点" prop="via">
<el-input v-model="addForm.via" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.via" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="到达地点" prop="destination">
<el-input v-model="addForm.destination" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="addForm.destination" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="出发公里数" prop="start_km">
<el-input-number v-model="addForm.start_km" clearable :disabled="localMode ==='view'"></el-input-number>
<el-input-number v-model="addForm.start_km" clearable :disabled="localMode ==='show'"></el-input-number>
</el-form-item>
<el-form-item label="归还公里数" prop="end_km" v-if="addForm.ticket_?.state_?.name=='用车中'">
<el-input-number v-model="addForm.end_km" clearable>
@ -41,38 +37,37 @@
<el-form-item label="出车时间">
<el-date-picker
v-model="addForm.start_time"
type="date"
type="datetime"
align="right"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
unlink-panels
placeholder="选择日期"
:disabled="mode==='view'"
:disabled="mode==='show'"
>
</el-date-picker>
</el-form-item>
<el-form-item label="还车时间" v-if="addForm.ticket_?.state_?.name=='用车中'">
<el-date-picker
v-model="addForm.end_time"
type="date"
type="datetime"
align="right"
value-format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
unlink-panels
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<el-footer v-show="mode!=='show'">
<el-footer>
<ticketd_b
:workflow_key="'vehicle'"
:title="ticketTitle"
:t_id="addForm.id"
:ticket_="addForm.ticket_"
:submit_b_func="submit_b_func"
:ticket_="addForm.ticket_"
:ticket_data="ticket_data"
ref="ticketd_b"
@success="$emit('success')"
@colsed="$emit('closed')"
/>
</el-footer>
</el-main>
@ -92,60 +87,33 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
props: {
mode: { type: String, default: "view" }, // add / edit / view
modelValue: { type: Object, default: () => ({}) },
transitions: { type: Array, default: () => [] },
mode: {
type: String, default: "show"
}, // add / edit / show
t_id: {
type: String,
default: null
},
},
components: {ticketd, ticketd_b},
emits: ["update:modelValue", "submit", "cancel"],
data() {
return {
addForm: {
ticket_: {
state_: { type: '' }
},
...this.modelValue },
ticketTitle: "用车申请",
ticket_data: {},
localMode : this.mode,
rules:{
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
},
workflow_key: "vehicle_in",
vehicle_scope:[{name: '市内', is_city: true},{name: '市外', is_city: false}],
}
addForm: {},
ticketTitle: "用车申请",
ticket_data: {},
localMode : this.mode,
rules:{
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
},
}
},
mounted() {
if (this.addForm.ticket_?.state_.type===1){
this.localMode = 'edit'
};
this.ticket_data = {
...this.ticket_data,
is_city: this.addForm.is_city,
};
this.getTid();
let that = this;
if (that.t_id) {
that.getTid();
}
},
watch: {
// ->
modelValue: {
handler(val) {
this.addForm = { ...val };
},
deep: true,
},
// ->
addForm: {
handler(val) {
this.$emit("update:modelValue", val);
},
deep: true,
},
addForm: {
handler(val) {
Object.assign(this.ticket_data, {
@ -157,23 +125,16 @@ export default {
deep: true,
}
},
methods: {
async submit_b_func() {
let that = this;
if (this.addForm.is_city === true){
that.workflow_key = "vehicle"
}else{
that.workflow_key = "vehicle_out"
}
this.ticketTitle = `${this.addForm.reason}-用车申请`
if(that.localMode == "add") {
let res = await that.$API.ofm.vehicle.create.req(that.addForm);
that.addForm.id = res.id;
} else if (that.localMode == "edit") {
await that.$API.ofm.vehicle.update.req(that.addForm.id, that.addForm);
}
},
let that = this;
if(that.localMode == "add") {
let res = await that.$API.ofm.vehicle.create.req(that.addForm);
that.addForm.id = res.id;
} else if (that.localMode == "edit") {
await that.$API.ofm.vehicle.update.req(that.addForm.id, that.addForm);
}
},
getTid (){
var that = this;
if (that.t_id) {

View File

@ -94,24 +94,22 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="所在节点" min-width="60">
<el-table-column label="审批信息" width="200">
<template #default="scope">
{{scope.row.ticket_?.state_?.name}}
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="60">
<template #default="scope">
{{statusOptions[scope.row.ticket_?.state_?.type]}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="paperseEdit(scope.row)"
v-auth="'PaperSe.update'"
@click="paperseShow(scope.row)"
>详情
</el-button>
<el-popconfirm
@ -134,7 +132,7 @@
</el-main>
</el-container>
<el-drawer
:title="drawerTitle[mode]"
title="专利管理"
v-model="limitedVisible"
:destroy-on-close="true"
direction="rtl"
@ -144,8 +142,7 @@
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
<PaperForm
:mode="mode"
v-model="addForm"
:transitions="transitions"
:t_id="t_id"
@success="()=>{handleQuery(); limitedVisible = false}"
@closed="limitedVisible = false"
/>
@ -156,116 +153,57 @@
<script>
import PaperForm from "./paperse_form.vue";
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
export default {
components: { PaperForm},
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
actStateEnum, interveneTypeEnum,
apiObj: this.$API.srm.papersecret.list,
selection: [],
checkList: [],
fileList: [],
transitions:[],
timeRange: [],
lending_type: "",
query: {},
editId: null,
isSaving: false,
t_id: null,
limitedVisible: false,
mode: "add",
drawerTitle: {
add: "新增论文申密",
edit: "审批流",
view: "查看论文申密",
},
statusOptions:{
0: "审批中",
1: "初始中",
2: "已完成",
},
currentRow: null,
//
addForm: {
paper_name: "",
publication_name:"",
author: "",
paper_type: "",
is_chinese_core: false,
is_sci: false,
tech_status: [],
tech_file: [],
ticket_:null
},
mode: "show",
fileList: [],
query: {},
};
},
mounted(){
let that = this;
that.getInit();
},
methods: {
//
//
getInit() {
let that = this;
if(this.addForm.ticket_!==null){
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
that.transitions = res;
})
}else{
that.$API.wf.workflow.initkey.req("paperse").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
},
handleAdd() {
this.mode = "add";
this.addForm = this.getDefaultForm();
this.lending_type = "";
this.t_id = null;
this.limitedVisible = true;
},
handleCancel() {
this.limitedVisible = false; //
this.lending_type = ""; // lending_type
this.getDefaultForm()//
},
getDefaultForm(){
return {
paper_name: "",
publication_name:"",
author: "",
paper_type: "",
is_chinese_core: false,
is_sci: false,
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
{ name: "是否发表过文章", status: "", fileList: [] },
{ name: "是否参与过展会展出", status: "", fileList: [] },
{ name: "是否应用于生产/销售", status: "", fileList: [] },
{ name: "是否参与过技术交流", status: "", fileList: [] }],
tech_file: [ { name: "论文内容", status: "", pages: "" },
{ name: "图或者照片", pages: "" }],
ticket_:null
}
},
// getDefaultForm(){
// return {
// paper_name: "",
// publication_name:"",
// author: "",
// paper_type: "",
// is_chinese_core: false,
// is_sci: false,
// tech_status: [{ name: "", status: "", fileList: [] },
// { name: "", status: "", fileList: [] },
// { name: "", status: "", fileList: [] },
// { name: "/", status: "", fileList: [] },
// { name: "", status: "", fileList: [] }],
// tech_file: [ { name: "", status: "", pages: "" },
// { name: "", pages: "" }],
// ticket_:null
// }
// },
//
paperseEdit(row) {
this.mode = "view";
this.editId = row.id;
paperseShow(row) {
this.mode = "show";
this.t_id = row.id;
this.limitedVisible = true;
this.addForm = Object.assign({}, row);
},
async papersetDel(row) {
var id = row.id;
var res = await this.$API.srm.papersecret.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
this.$refs.table.refresh();
this.$message.success("删除成功");
},
//
handleQuery() {

View File

@ -3,28 +3,28 @@
<el-main>
<el-form :model="localForm" label-width="150px" label-position="left" :rules="rules">
<el-form-item label="拟发表论文名称" prop="paper_name">
<el-input v-model="localForm.paper_name" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="localForm.paper_name" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="拟投期刊名称" prop="publication_name">
<el-input v-model="localForm.publication_name" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="localForm.publication_name" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="作者" prop="author" >
<el-input v-model="localForm.author" clearable ></el-input>
</el-form-item>
<el-form-item label="拟发表文章类型" prop="paper_type">
<el-select v-model="localForm.paper_type" placeholder="请选择拟发表文章类型" :disabled="localMode ==='view'">
<el-select v-model="localForm.paper_type" placeholder="请选择拟发表文章类型" :disabled="localMode ==='show'">
<el-option label="研究论文" value="研究论文"></el-option>
<el-option label="综述" value="综述"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否为中文核心" prop="is_chinese_core">
<el-radio-group v-model="localForm.is_chinese_core" :disabled="localMode ==='view'">
<el-radio-group v-model="localForm.is_chinese_core" :disabled="localMode ==='show'">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否被SCI/EI收录" prop="is_sci">
<el-radio-group v-model="localForm.is_sci" :disabled="localMode ==='view'">
<el-radio-group v-model="localForm.is_sci" :disabled="localMode ==='show'">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
@ -34,7 +34,7 @@
<el-col :span="12" v-for="(item, index) in localForm.tech_status || []" :key="index">
<div class="class-row">
<span>{{ item.name }}</span>
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='view'">
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='show'">
<el-radio label="是"></el-radio>
<el-radio label="否"></el-radio>
</el-radio-group>
@ -42,27 +42,32 @@
<div v-if="item.status === '是'" class="upload-section">
<sc-upload-file
multiple
:limit="3"
:limit="1"
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
@success = "(res)=>fileUPSuccess(res, item)"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
>
<el-button type="primary" size="small" icon="el-icon-upload"> </el-button>
</sc-upload-file>
<div v-if="item.file" class="file-list">
<el-link type="primary" :href="item.file" target="_blank">
{{ item.file.split('/').pop() }}
</el-link>
</div>
</div>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="技术文件" prop="tech_file">
<div class="file-item" v-for="(item, index) in localForm.tech_file || []" :key="index">
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='view'">
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='show'">
{{ item.name }}
</el-checkbox>
<el-input
class="page-input"
v-model="item.pages"
placeholder="页/张数"
:disabled="!item.checked || localMode ==='view'"
:disabled="!item.checked || localMode ==='show'"
type="number"
min="0">
<template v-slot:append>/</template>
@ -70,7 +75,7 @@
</div>
</el-form-item>
</el-form>
<el-footer v-show="localMode!=='show'">
<el-footer>
<ticketd_b
:workflow_key="'paperse'"
:title="ticketTitle"
@ -80,7 +85,6 @@
:submit_b_func="submit_b_func"
ref="ticketd_b"
@success="$emit('success')"
@colsed="$emit('closed')"
/>
</el-footer>
</el-main>
@ -100,42 +104,48 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
props: {
mode: { type: String, default: "view" }, // add / edit / view
modelValue: { type: Object, default: () => ({}) },
mode: { type: String,
default: "show"
},
t_id: {
type: String,
default: null
},
},
},
components: {ticketd, ticketd_b},
emits: ["update:modelValue", "submit", "cancel"],
data() {
return {
ticket_data: {},
ticketTitle: "论文申密申请",
localMode : this.mode,
localForm: {
paper_name: "",
publication_name:"",
author: "",
paper_type: "",
is_chinese_core: false,
is_sci: false,
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
{ name: "是否发表过文章", status: "", fileList: [] },
{ name: "是否参与过展会展出", status: "", fileList: [] },
{ name: "是否应用于生产/销售", status: "", fileList: [] },
{ name: "是否参与过技术交流", status: "", fileList: [] }],
tech_file: [ { name: "论文内容", status: "", pages: "" },
{ name: "图或者照片", pages: "" }],
ticket_:null
},
rules: {
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
},
localForm: {
ticket_: { state_: { type: '' } },
...(this.modelValue || {}) }
};
},
mounted() {
console.log('mode', this.localMode)
let that = this;
if (that.t_id) {
that.getTid();
}
},
watch: {
localForm: {
handler(val) {
Object.assign(this.ticket_data, {
author: val.author,
// ...
});
},
deep: true,
}
},
methods: {
async submit_b_func() {
let that = this;
@ -144,7 +154,6 @@ export default {
}
if(that.localMode == "add") {
let res = await that.$API.srm.papersecret.create.req(that.localForm);
that.localForm.id = res.id;
} else if (that.localMode == "edit") {
await that.$API.srm.papersecret.update.req(that.localForm.id, that.localForm);

View File

@ -98,24 +98,22 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="所在节点" min-width="60">
<el-table-column label="审批信息" width="200">
<template #default="scope">
{{scope.row.ticket_.state_.name}}
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="60">
<template #default="scope">
{{statusOptions[scope.row.ticket_.state_.type]}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="patentEdit(scope.row)"
v-auth="'patentinfo.update'"
@click="patentShow(scope.row)"
>详情
</el-button>
<el-popconfirm
@ -138,7 +136,7 @@
</el-main>
</el-container>
<el-drawer
:title="drawerTitle[mode]"
title="专利审批"
v-model="limitedVisible"
:destroy-on-close="true"
direction="rtl"
@ -148,8 +146,7 @@
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
<PatentForm
:mode="mode"
v-model="addForm"
:transitions="transitions"
:t_id="t_id"
@success="()=>{handleQuery(); limitedVisible = false}"
@closed="limitedVisible = false"
/>
@ -160,25 +157,19 @@
<script>
import PatentForm from "./patent_form.vue";
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
export default {
components: { PatentForm},
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
actStateEnum, interveneTypeEnum,
apiObj: this.$API.srm.patentinfo.list,
selection: [],
checkList: [],
fileList: [],
transitions:[],
timeRange: [],
lending_type: "",
query: {},
editId: null,
isSaving: false,
t_id:null,
limitedVisible: false,
mode: "add",
mode: "show",
patentType: {
"invention": "发明专利",
"utility": "实用新型",
@ -189,156 +180,53 @@ export default {
'Foreign':'国外申请',
'PCT':'PCT申请',
},
drawerTitle: {
add: "新增专利申密",
edit: "审批流",
view: "查看专利申密",
},
statusOptions:{
0: "审批中",
1: "初始中",
2: "已完成",
},
currentRow: null,
//
addForm: {
author: "",
name: "",
type: "",
is_public: false,
area: null,
other_area: null,
tech_status: [],
tech_file: [],
ticket_:null
},
};
},
mounted(){
let that = this;
that.getInit();
},
methods: {
//
//
getInit() {
let that = this;
if(this.addForm.ticket_!==null){
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
that.transitions = res;
})
}else{
that.$API.wf.workflow.initkey.req("patent").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
},
handleAdd() {
this.mode = "add";
this.addForm = this.getDefaultForm();
this.lending_type = "";
this.t_id = null;
this.limitedVisible = true;
},
handleCancel() {
this.limitedVisible = false; //
this.lending_type = ""; // lending_type
this.getDefaultForm()//
},
getDefaultForm(){
return {
name: "",
author: "",
type: "",
is_public: false,
area: null,
other_area: null,
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
{ name: "是否发表过文章", status: "", fileList: [] },
{ name: "是否参与过展会展出", status: "", fileList: [] },
{ name: "是否应用于生产/销售", status: "", fileList: [] },
{ name: "是否参与过技术交流", status: "", fileList: [] }],
tech_file: [ { name: "技术背景材料", status: "", pages: "" },
{ name: "技术交底材料", pages: "" },
{ name: "查新检索报告", pages: "" },
{ name: "图或者照片", pages: "" }],
ticket_:null
}
},
// getDefaultForm(){
// return {
// name: "",
// author: "",
// type: "",
// is_public: false,
// area: null,
// other_area: null,
// tech_status: [{ name: "", status: "", fileList: [] },
// { name: "", status: "", fileList: [] },
// { name: "", status: "", fileList: [] },
// { name: "/", status: "", fileList: [] },
// { name: "", status: "", fileList: [] }],
// tech_file: [ { name: "", status: "", pages: "" },
// { name: "", pages: "" },
// { name: "", pages: "" },
// { name: "", pages: "" }],
// ticket_:null
// }
// },
//
patentEdit(row) {
this.mode = "view";
this.editId = row.id;
patentShow(row) {
this.mode = "show";
this.t_id = row.id;
this.limitedVisible = true;
this.addForm = Object.assign({}, row);
},
async patentDel(row) {
var id = row.id;
var res = await this.$API.srm.patentinfo.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
this.$refs.table.refresh();
this.$message.success("删除成功");
},
//
handleQuery() {
this.$refs.table.queryData(this.query);
},
},
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

View File

@ -3,7 +3,7 @@
<el-main>
<el-form :model="localForm" label-width="150px" label-position="left" :rules="rules">
<el-form-item label="拟申请专利名称" prop="name">
<el-input v-model="localForm.name" clearable :disabled="localMode ==='view'"></el-input>
<el-input v-model="localForm.name" clearable :disabled="localMode ==='show'"></el-input>
</el-form-item>
<el-form-item label="发明人(设计人)"
prop="author"
@ -11,20 +11,20 @@
<el-input v-model="localForm.author" clearable ></el-input>
</el-form-item>
<el-form-item label="专利类型" prop="type">
<el-select v-model="localForm.type" placeholder="请选择专利类型" :disabled="localMode ==='view'">
<el-select v-model="localForm.type" placeholder="请选择专利类型" :disabled="localMode ==='show'">
<el-option label="发明专利" value="invention"></el-option>
<el-option label="实用新型专利" value="utility"></el-option>
<el-option label="外观设计专利" value="design"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否公开" prop="is_public">
<el-radio-group v-model="localForm.is_public" :disabled="localMode ==='view'">
<el-radio-group v-model="localForm.is_public" :disabled="localMode ==='show'">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="拟申请地域">
<el-radio-group v-model="localForm.area" :disabled="localMode ==='view'">
<el-radio-group v-model="localForm.area" :disabled="localMode ==='show'">
<el-radio label="国内申请" value="Domestic"></el-radio>
<el-radio label="国外申请" value="Foreign"></el-radio>
<el-radio label="PCT申请" value="PCT"></el-radio>
@ -35,7 +35,7 @@
placeholder = "请输入申请的国家"
size = "small"
style="margin-top: 10;"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
></el-input>
</el-form-item>
<el-form-item label="技术状态" prop="tech_status">
@ -43,7 +43,7 @@
<el-col :span="12" v-for="(item, index) in localForm.tech_status || []" :key="index">
<div class="class-row">
<span>{{ item.name }}</span>
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='view'">
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='show'">
<el-radio label="是"></el-radio>
<el-radio label="否"></el-radio>
</el-radio-group>
@ -51,27 +51,32 @@
<div v-if="item.status === '是'" class="upload-section">
<sc-upload-file
multiple
:limit="3"
:limit="1"
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
@success = "(res)=>fileUPSuccess(res, item)"
:disabled="localMode ==='view'"
:disabled="localMode ==='show'"
>
<el-button type="primary" size="small" icon="el-icon-upload"> </el-button>
</sc-upload-file>
<div v-if="item.file && localMode ==='show'" class="file-list">
<el-link type="primary" :href="item.file" target="_blank">
{{ item.file.split('/').pop() }}
</el-link>
</div>
</div>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="技术文件" prop="tech_file">
<div class="file-item" v-for="(item, index) in localForm.tech_file || []" :key="index">
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='view'">
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='show'">
{{ item.name }}
</el-checkbox>
<el-input
class="page-input"
v-model="item.pages"
placeholder="页数"
:disabled="!item.checked || localMode ==='view'"
:disabled="!item.checked || localMode ==='show'"
type="number"
min="0">
<template v-slot:append></template>
@ -79,7 +84,7 @@
</div>
</el-form-item>
</el-form>
<el-footer v-show="localMode!=='show'">
<el-footer>
<ticketd_b
:workflow_key="'patent'"
:title="ticketTitle"
@ -89,7 +94,6 @@
:submit_b_func="submit_b_func"
ref="ticketd_b"
@success="$emit('success')"
@colsed="$emit('closed')"
/>
</el-footer>
</el-main>
@ -109,15 +113,16 @@ import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
props: {
mode: { type: String, default: "view" }, // add / edit / view
modelValue: { type: Object, default: () => ({}) },
mode: {
type: String,
default: "show"
}, // add / edit / view
t_id: {
type: String,
default: null
},
},
},
components: {ticketd, ticketd_b},
emits: ["update:modelValue", "submit", "cancel"],
data() {
return {
ticket_data: {},
@ -126,33 +131,38 @@ export default {
rules: {
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
},
localForm: {
ticket_: { state_: { type: '' } },
...(this.modelValue || {}) }
localForm:{
name: "",
author: "",
type: "",
is_public: false,
area: null,
other_area: null,
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
{ name: "是否发表过文章", status: "", fileList: [] },
{ name: "是否参与过展会展出", status: "", fileList: [] },
{ name: "是否应用于生产/销售", status: "", fileList: [] },
{ name: "是否参与过技术交流", status: "", fileList: [] }],
tech_file: [ { name: "技术背景材料", status: "", pages: "" },
{ name: "技术交底材料", pages: "" },
{ name: "查新检索报告", pages: "" },
{ name: "图或者照片", pages: "" }],
ticket_:null
},
};
},
// mounted() {
// let that = this;
// console.log('666666',that.ticket_data)
// },
watch: {
localForm: {
handler(val) {
Object.assign(this.ticket_data, {
author: val.author,
// ...
});
},
deep: true,
}
},
mounted() {
let that = this;
if (that.t_id) {
that.getTid();
}
},
methods: {
async submit_b_func() {
let that = this;
if(that.localForm?.id){
that.localMode = "edit";
}
console.log('that.localForm',that.localMode, that.localForm)
if(that.localMode == "add") {
let res = await that.$API.srm.patentinfo.create.req(that.localForm);
that.localForm.id = res.id;
@ -196,19 +206,4 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.status-item {
margin-bottom: 15px;
}
.status-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.upload-section {
margin-left: 10px;
border-left: 2px solid #eee;
padding-left: 10px;
}
</style>
</script>

289
src/views/srm/plat.vue Normal file
View File

@ -0,0 +1,289 @@
<template>
<el-container>
<el-header>
<div class="left-panel-group">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-auth="'PaperSe.create'"
>新增</el-button>
</div>
<!-- <div class="right-panel">
<el-input
v-model="query.paper_name"
placeholder="发表论文名称"
clearable
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div> -->
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id">
<el-table-column label="#" type="index"></el-table-column>
<el-table-column
label="日期"
prop="p_date"
min-width="60"
></el-table-column>
<el-table-column
label="归口部门"
prop="p_dept"
min-width="60"
></el-table-column>
<el-table-column
label="建设期"
prop="const"
min-width="60"
></el-table-column>
<el-table-column label="市级平台" prop="city_p" mim-width="60">
<template #default="scope">
<span :style="{color: scope.row.city_p ? '#67C23A' : '#F56C6C'}">
{{ scope.row.city_p ? '是' : '否'}}
</span>
</template>
</el-table-column>
<el-table-column label="省级平台" prop="province_p" mim-width="60">
<template #default="scope">
<span :style="{color: scope.row.province_p ? '#67C23A' : '#F56C6C'}">
{{ scope.row.province_p ? '是' : '否'}}
</span>
</template>
</el-table-column>
<el-table-column
label="负责人"
prop="charge"
min-width="60"
></el-table-column>
<el-table-column
label="平台基本情况与目标绩效"
prop="condition"
min-width="60"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120">
<template #default="scope">
<el-button
link
size="small"
type="primary"
@click="paperseEdit(scope.row)"
v-auth="'PaperSe.update'"
>详情
</el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="papersetDel(scope.row)"
>
<template #reference>
<el-button
link
size="small"
type="danger"
v-auth="'PaperSe.delete'"
>删除</el-button
>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-drawer
:title="drawerTitle[mode]"
v-model="limitedVisible"
:destroy-on-close="true"
direction="rtl"
size="70%"
>
<div style="display: flex; height: calc(100% - 60px);">
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
<PaperForm
:mode="mode"
v-model="addForm"
:transitions="transitions"
@success="()=>{handleQuery(); limitedVisible = false}"
@closed="limitedVisible = false"
/>
</div>
</div>
</el-drawer>
</template>
<script>
import PaperForm from "./paperse_form.vue";
export default {
components: { PaperForm},
name: "index",
data() {
return {
workflowName:"",
workFlowId:'',
apiObj: this.$API.srm.papersecret.list,
selection: [],
checkList: [],
fileList: [],
transitions:[],
timeRange: [],
lending_type: "",
query: {},
editId: null,
isSaving: false,
limitedVisible: false,
mode: "add",
drawerTitle: {
add: "新增论文申密",
edit: "审批流",
view: "查看论文申密",
},
statusOptions:{
0: "审批中",
1: "初始中",
2: "已完成",
},
currentRow: null,
//
addForm: {
paper_name: "",
publication_name:"",
author: "",
paper_type: "",
is_chinese_core: false,
is_sci: false,
tech_status: [],
tech_file: [],
ticket_:null
},
};
},
mounted(){
let that = this;
that.getInit();
},
methods: {
//
//
getInit() {
let that = this;
if(this.addForm.ticket_!==null){
this.$API.wf.ticket_.ticketTransitions.req(this.addForm.ticket_).then((res) => {
that.transitions = res;
})
}else{
that.$API.wf.workflow.initkey.req("paperse").then((res) => {
that.initForm = res;
that.transitions = res.transitions;
});
}
},
handleAdd() {
this.mode = "add";
this.addForm = this.getDefaultForm();
this.lending_type = "";
this.limitedVisible = true;
},
handleCancel() {
this.limitedVisible = false; //
this.lending_type = ""; // lending_type
this.getDefaultForm()//
},
getDefaultForm(){
return {
paper_name: "",
publication_name:"",
author: "",
paper_type: "",
is_chinese_core: false,
is_sci: false,
tech_status: [{ name: "是否进行过科技成果鉴定", status: "", fileList: [] },
{ name: "是否发表过文章", status: "", fileList: [] },
{ name: "是否参与过展会展出", status: "", fileList: [] },
{ name: "是否应用于生产/销售", status: "", fileList: [] },
{ name: "是否参与过技术交流", status: "", fileList: [] }],
tech_file: [ { name: "论文内容", status: "", pages: "" },
{ name: "图或者照片", pages: "" }],
ticket_:null
}
},
//
paperseEdit(row) {
this.mode = "view";
this.editId = row.id;
this.limitedVisible = true;
this.addForm = Object.assign({}, row);
},
async papersetDel(row) {
var id = row.id;
var res = await this.$API.srm.papersecret.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
},
//
handleQuery() {
this.$refs.table.queryData(this.query);
},
},
};
</script>
<style scoped>
.treeMain {
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
background-color: #fefefe;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}
.left-panel-group {
display: flex;
align-items: center;
gap: 6px; /* 按钮之间的间隙,可以调小点 */
margin-left: 0; /* 靠左 */
}
</style>

204
src/views/srm/plat_form.vue Normal file
View File

@ -0,0 +1,204 @@
<template>
<el-container>
<el-main>
<el-form :model="localForm" label-width="150px" label-position="left" :rules="rules">
<el-form-item label="拟发表论文名称" prop="paper_name">
<el-input v-model="localForm.paper_name" clearable :disabled="localMode ==='view'"></el-input>
</el-form-item>
<el-form-item label="拟投期刊名称" prop="publication_name">
<el-input v-model="localForm.publication_name" clearable :disabled="localMode ==='view'"></el-input>
</el-form-item>
<el-form-item label="作者" prop="author" >
<el-input v-model="localForm.author" clearable ></el-input>
</el-form-item>
<el-form-item label="拟发表文章类型" prop="paper_type">
<el-select v-model="localForm.paper_type" placeholder="请选择拟发表文章类型" :disabled="localMode ==='view'">
<el-option label="研究论文" value="研究论文"></el-option>
<el-option label="综述" value="综述"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否为中文核心" prop="is_chinese_core">
<el-radio-group v-model="localForm.is_chinese_core" :disabled="localMode ==='view'">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否被SCI/EI收录" prop="is_sci">
<el-radio-group v-model="localForm.is_sci" :disabled="localMode ==='view'">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="技术状态" prop="tech_status">
<el-row>
<el-col :span="12" v-for="(item, index) in localForm.tech_status || []" :key="index">
<div class="class-row">
<span>{{ item.name }}</span>
<el-radio-group v-model="item.status" @change="handleStatusChange(item)" style="margin-left: 20px;" :disabled="localMode ==='view'">
<el-radio label="是"></el-radio>
<el-radio label="否"></el-radio>
</el-radio-group>
</div>
<div v-if="item.status === '是'" class="upload-section">
<sc-upload-file
multiple
:limit="3"
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
@success = "(res)=>fileUPSuccess(res, item)"
:disabled="localMode ==='view'"
>
<el-button type="primary" size="small" icon="el-icon-upload"> </el-button>
</sc-upload-file>
</div>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="技术文件" prop="tech_file">
<div class="file-item" v-for="(item, index) in localForm.tech_file || []" :key="index">
<el-checkbox class="file-checkbox" v-model="item.checked" @change="handleCheckChange(item)" :disabled="localMode ==='view'">
{{ item.name }}
</el-checkbox>
<el-input
class="page-input"
v-model="item.pages"
placeholder="页/张数"
:disabled="!item.checked || localMode ==='view'"
type="number"
min="0">
<template v-slot:append>/</template>
</el-input>
</div>
</el-form-item>
</el-form>
<el-footer v-show="localMode!=='show'">
<ticketd_b
:workflow_key="'paperse'"
:title="ticketTitle"
:t_id="localForm.id"
:ticket_="localForm.ticket_"
:ticket_data="ticket_data"
:submit_b_func="submit_b_func"
ref="ticketd_b"
@success="$emit('success')"
@colsed="$emit('closed')"
/>
</el-footer>
</el-main>
<el-aside v-if="localForm.ticket_">
<ticketd
:ticket_="localForm.ticket_"
:ticket_data="ticket_data"
@success="$emit('success')"
style="margin-top: 20px;"
/>
</el-aside>
</el-container>
</template>
<script>
import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
props: {
mode: { type: String, default: "view" }, // add / edit / view
modelValue: { type: Object, default: () => ({}) },
t_id: {
type: String,
default: null
},
},
components: {ticketd, ticketd_b},
emits: ["update:modelValue", "submit", "cancel"],
data() {
return {
ticket_data: {},
ticketTitle: "论文申密申请",
localMode : this.mode,
rules: {
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
},
localForm: {
ticket_: { state_: { type: '' } },
...(this.modelValue || {}) }
};
},
mounted() {
console.log('mode', this.localMode)
},
watch: {
localForm: {
handler(val) {
Object.assign(this.ticket_data, {
author: val.author,
// ...
});
},
deep: true,
}
},
methods: {
async submit_b_func() {
let that = this;
if(that.localForm?.id){
that.localMode = "edit";
}
if(that.localMode == "add") {
let res = await that.$API.srm.papersecret.create.req(that.localForm);
that.localForm.id = res.id;
} else if (that.localMode == "edit") {
await that.$API.srm.papersecret.update.req(that.localForm.id, that.localForm);
}
},
getTid (){
var that = this;
if (that.t_id) {
that.$API.srm.papersecret.item.req(that.t_id).then(res=>{
that.localForm = res;
if(res.ticket_?.state_?.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
that.localMode = "edit";
}else{
that.localMode = "show";
}
})
}
},
fileUPSuccess(res, item) {
if(!item.fileList) {
item.fileList = []
}
item.fileList.push(res.path)
item.file = res.path
},
handleCheckChange(item) {
//
if (!item.checked) {
item.pages = '';
}
},
//
handleStatusChange(item) {
if (item.status === "否") {
item.file = "";
item.fileList = [];
}
},
},
};
</script>
<style lang="scss" scoped>
.status-item {
margin-bottom: 15px;
}
.status-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.upload-section {
margin-left: 10px;
border-left: 2px solid #eee;
padding-left: 10px;
}
</style>

View File

@ -41,8 +41,8 @@
</el-table-column>
<el-table-column label="总数">
<template #default="scope">
<span v-if="scope.row.总生产数">{{ scope.row.总生产数 }}</span>
<span v-if="scope.row.总切片数">{{ scope.row.总切片数 }}</span>
<span v-else>{{ scope.row.总生产数 }}</span>
</template>
</el-table-column>
<el-table-column label="剪切">
@ -52,36 +52,30 @@
</el-table-column>
<el-table-column label="剪切加功率">
<template #default="scope">
<span v-if="scope.row['剪切¢18.3mm不合格']">{{ (((scope.row.总切片数-scope.row['剪切18.3mm不合格'])/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-if="scope.row['剪切¢18.3mm不合格']">{{ (((scope.row.总切片数-scope.row['剪切18.3mm不合格'].含)/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>100%</span>
</template>
</el-table-column>
<el-table-column label="暗点">
<template #default="scope">
<span v-if="scope.row.暗点合格">{{((scope.row.暗点合格/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-if="scope.row.暗点合格">{{((scope.row.暗点合格.含/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>0%</span>
</template>
</el-table-column>
<el-table-column label="长点率">
<template #default="scope">
<span v-if="scope.row.暗点不合格">{{((scope.row.暗点不合格/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-if="scope.row.暗点不合格">{{((scope.row.暗点不合格.含/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>0%</span>
</template>
</el-table-column>
<el-table-column label="加功率">
<template #default="scope">
<span v-if="scope.row.可加工数">{{((scope.row.可加工数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数">
<template #default="scope">
<span v-if="scope.row.不合格数">{{((scope.row.不合格数/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-if="scope.row.总切片合格数">{{((scope.row.总切片合格数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="合格率" prop="合格率">
<template #default="scope">
<span v-if="scope.row['剪切¢18.3mm可加工']">{{ scope.row['剪切18.3mm不合格']?scope.row.总切片数 - scope.row['剪切18.3mm可加工']- scope.row['剪切18.3mm不合格']+scope.row.暗点合格:scope.row.总切片数 - scope.row['剪切18.3mm可加工']+scope.row.暗点合格}}</span>
<span v-else>{{ scope.row['剪切18.3mm不合格']?scope.row.总切片数 - scope.row['剪切18.3mm不合格']+scope.row.暗点合格:scope.row.总切片数}}</span>
<span v-if="scope.row.总切片完全合格数">{{((scope.row.总切片完全合格数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
</scTable>
@ -134,34 +128,18 @@ export default {
item.可加工数 = 0;
if(item['剪切¢18.3mm不合格']){
if(item['剪切¢18.3mm可加工']){
item.剪切合格 = item.总切片数 - item['剪切¢18.3mm可加工']- item['剪切¢18.3mm不合格'];
item.剪切合格 = item.总切片数 - item['剪切¢18.3mm可加工'].- item['剪切¢18.3mm不合格'].;
}else{
item.剪切合格 = item.总切片数 - item['剪切¢18.3mm不合格'];
}
if(item.暗点不合格){
item.不合格数 = item['剪切¢18.3mm不合格'] + item.暗点不合格;
item.可加工数 = item.总切片数 - item['剪切¢18.3mm不合格'] - item.暗点不合格;
}else{
item.不合格数 = item['剪切¢18.3mm不合格'];
item.可加工数 = item.总切片数 - item['剪切¢18.3mm不合格'];
item.剪切合格 = item.总切片数 - item['剪切¢18.3mm不合格'].;
}
}else{
if(item['剪切¢18.3mm可加工']){
item.剪切合格 = item.总切片数 - item['剪切¢18.3mm可加工'];
item.剪切合格 = item.总切片数 - item['剪切¢18.3mm可加工'].;
}else{
item.剪切合格 = item.总切片数;
}
if(item.暗点不合格){
item.不合格数 = item.暗点不合格;
item.可加工数 = item.总切片数 - item.暗点不合格;
}else{
item.不合格数 = 0;
item.可加工数 = item.总切片数;
}
}
})
console.log('data',data)
that.tableData = data;
});
},

View File

@ -3,19 +3,19 @@
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-cascader
<!-- <el-cascader
v-model="query.dept_name"
:options="group"
:props="groupsProps"
clearable
:show-all-levels="false"
@change="deptChange">
</el-cascader>
<!-- <el-input v-model="query.user_name"
</el-cascader> -->
<el-input v-model="query.user_name"
placeholder="姓名"
clearable
style="width: 200px;"
></el-input> -->
></el-input>
<el-date-picker
v-model="query.start_date"
type="date"
@ -45,23 +45,20 @@
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="工段" prop="工段">
<el-table-column label="日期" prop="日期" width="120">
</el-table-column>
<el-table-column label="日期" prop="日期">
<el-table-column label="操作人" prop="操作人" width="120">
</el-table-column>
<el-table-column v-for="item in lists" :key="item" :label="item" :prop="item">
<template #default="scope">
{{ scope.row.}}-{{ scope.row.}}-{{ scope.row.}}
{{ scope.row[item] }}
</template>
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="生产数" prop="生产数">
</el-table-column>
<el-table-column label="合格数" prop="合格数">
</el-table-column>
<el-table-column label="不合格数" prop="不合格数">
</el-table-column>
<el-table-column label="合格率" prop="合格率">
</el-table-column>
<!-- <el-table-column label="生产数" prop="生产数">
<template #default="scope">
<span v-for="item in scope.row.list" :key="item">{{ item.text }}:{{ item.value }}</span>
</template>
</el-table-column> -->
</scTable>
</el-main>
</el-container>
@ -78,7 +75,7 @@ export default {
dept_name:'',
start_date:'',
},
group: [],
mgroups: [],
tableData:[],
groupsProps: {
value: "name",
@ -107,8 +104,17 @@ export default {
let that = this;
let params = {};
params.query = that.query;
that.$API.bi.dataset.exec.req('performance', params).then((res) => {
that.tableData = res.data2.ds0;
that.$API.bi.dataset.exec.req('lineDay_p', params).then((res) => {
let data = res.data2.ds0;
that.lists = [];
data.forEach(item=>{
let obj = JSON.parse(item.工段物料生产数);
for(let key in obj){
item[key]= obj[key];
if(that.lists.indexOf(key)>-1){}else{that.lists.push(key)}
}
})
that.tableData = data;
});
},
deptChange(){

View File

@ -61,6 +61,7 @@
row-key="id"
:params="params"
:query="query"
default-expand-all
>
<el-table-column
label="#"