00517d7a by renchao@pashanhoo.com

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents f9953433 ed2d1b5f
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
127 // 单选 127 // 单选
128 singleElection (row) { 128 singleElection (row) {
129 this.selected = this.data.indexOf(row); 129 this.selected = this.data.indexOf(row);
130 this.$emit('row-click', val) 130 this.$emit('row-click', row)
131 }, 131 },
132 132
133 tableRowClassName ({ row, rowIndex }) { 133 tableRowClassName ({ row, rowIndex }) {
......
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-05-17 10:40:02
5 -->
6 <template>
7 <div>
8 <el-button type="primary" native-type="submit" @click="openDialog">新增常用</el-button>
9 <el-form ref="form" :model="form" :rules="rules" label-width="80px" v-show="addDialog">
10 <el-form-item prop="commonOpinion">
11 <div class="invalid-reson">常用意见:</div>
12 <el-input v-model="form.commonOpinion" placeholder="请输入常用意见" type="textarea" :rows="4"></el-input>
13 </el-form-item>
14 <el-form-item class="text-center">
15 <el-button @click="closeaddDiglog">取 消</el-button>
16 <el-button type="primary" @click="addOpinion">确 定</el-button>
17 </el-form-item>
18 </el-form>
19 <lb-table :heightNumSetting="true"
20 @row-dblclick="handleRowClick"
21 :pagination="false" :column="columns" :minHeight="300" :data="tableData.data">
22 </lb-table>
23 <div style="height:15px"></div>
24 <div class="text-center">
25 <el-button @click="$popupCacel">取消</el-button>
26 </div>
27 </div>
28 </template>
29 <script>
30 import store from '@/store/index.js'
31 import { getUserCommonOpinion, addUserCommonOpinion, delUserCommonOpinion } from "@/api/fqsq.js"
32 export default {
33 components: {},
34 props: {
35 formData: {
36 type: Object,
37 default: {}
38 }
39 },
40 data () {
41 return {
42 addDialog: false,
43 columns: [
44 {
45 label: '序号',
46 type: 'index',
47 width: '50',
48 },
49 {
50 prop: "opinion",
51 label: "意见描述",
52 },
53 {
54 label: '操作',
55 width: '100',
56 render: (h, scope) => {
57 return (
58 <div>
59 <el-button type="text" onClick={() => { this.useCommonOpinion(scope.row) }}>使用</el-button>
60 <el-button type="text" onClick={() => { this.deleteOpinion(scope.row) }}>删除</el-button>
61 </div>
62 )
63 }
64 }
65 ],
66 tableData: {
67 total: 0,
68 data: [],
69 },
70 form: {
71 commonOpinion: '',
72 },
73 rules: {
74 commonOpinion: [
75 { required: true, message: '请输入常用意见', trigger: 'blur' }
76 ]
77 }
78 }
79 },
80 mounted () {
81 this.getList()
82 },
83 methods: {
84 getList () {
85 getUserCommonOpinion().then(res => {
86 this.tableData.data = res.result
87 })
88 },
89 //新增常用意见
90 addOpinion () {
91 this.$refs.form.validate(valid => {
92 if (valid) {
93 addUserCommonOpinion({ commonOpinion: this.form.commonOpinion }).then(res => {
94 if (res.code == 200) {
95 this.$message.success("新增成功")
96 this.closeaddDiglog();
97 this.getList()
98 } else {
99 this.$message.error(res.message)
100 }
101 })
102 } else {
103 return false;
104 }
105 });
106 },
107 //打开新增弹窗
108 openDialog () {
109 this.addDialog = true
110 },
111 //关闭新增弹窗
112 closeaddDiglog () {
113 this.addDialog = false
114 this.$refs['form'].resetFields();
115 },
116 handleRowClick (item) {
117 this.useCommonOpinion(item)
118 },
119 //使用常用意见
120 useCommonOpinion (item) {
121 store.dispatch('workflow/setOptions', item.opinion);
122 this.$popupCacel()
123 },
124 //删除常用意见
125 deleteOpinion (item) {
126 this.$confirm("确定要删除吗, 是否继续?", "提示", {
127 confirmButtonText: "确定",
128 cancelButtonText: "取消",
129 type: "warning",
130 }).then(() => {
131 delUserCommonOpinion({ bsmOpinion: item.bsmOpinion }).then(res => {
132 if (res.code == 200) {
133 this.$message.success("删除成功")
134 this.getList()
135 } else {
136 this.$message.error(res.message)
137 }
138 })
139 })
140 .catch(() => {
141 this.$message({
142 type: "info",
143 message: "已取消删除",
144 });
145 });
146 },
147 //关闭列表弹窗
148 closeDialog () {
149 this.form.commonOpinion = "";
150 }
151 }
152 }
153 </script>
154 <style scoped lang='scss'>
155 @import "~@/styles/mixin.scss";
156 @import "~@/styles/dialogBox.scss";
157
158 .invalid-reson {
159 margin-bottom: 10px;
160 }
161
162 .dialog-footer {
163 margin-top: 10px;
164 display: flex;
165 justify-content: flex-end;
166 }
167 </style>
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
104 mounted() { 104 mounted() {
105 this.delel=this.$parent.isEdit 105 this.delel=this.$parent.isEdit
106 this.loadBdcdylist(); 106 this.loadBdcdylist();
107 this.getleftMenubl(); 107 // this.getleftMenubl();
108 108
109 109
110 }, 110 },
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
121 }, 121 },
122 methods: { 122 methods: {
123 //读取申请单元信息 123 //读取申请单元信息
124 loadBdcdylist(add) { 124 loadBdcdylist() {
125 var formdata = new FormData(); 125 var formdata = new FormData();
126 if(this.bsmSlsq){ 126 if(this.bsmSlsq){
127 formdata.append("bsmSlsq", this.bsmSlsq); 127 formdata.append("bsmSlsq", this.bsmSlsq);
...@@ -130,9 +130,6 @@ export default { ...@@ -130,9 +130,6 @@ export default {
130 if (res.code === 200 && res.result) { 130 if (res.code === 200 && res.result) {
131 this.currentSelectProps = res.result[0]; 131 this.currentSelectProps = res.result[0];
132 this.$emit("getCurrentSelectProps", this.currentSelectProps); 132 this.$emit("getCurrentSelectProps", this.currentSelectProps);
133 if(add){
134 this.$parent.getQllxByBdcdyid()
135 }
136 } 133 }
137 }); 134 });
138 } 135 }
...@@ -141,9 +138,13 @@ export default { ...@@ -141,9 +138,13 @@ export default {
141 }, 138 },
142 // 获取右侧菜单 139 // 获取右侧菜单
143 getleftMenubl(row) { 140 getleftMenubl(row) {
141
144 leftMenubl(this.bsmSlsq).then((res) => { 142 leftMenubl(this.bsmSlsq).then((res) => {
145 this.supplementarylist = res.result; 143 this.supplementarylist = res.result;
146 if(row){ 144 if(row==1){
145 this.delel=false
146 }
147 if(row&&row!=1){
147 this.supplementarylist.forEach((item,index) => { 148 this.supplementarylist.forEach((item,index) => {
148 if(item.bsmRepair==row.bsmRepair){ 149 if(item.bsmRepair==row.bsmRepair){
149 this.activeIndex=index.toString() 150 this.activeIndex=index.toString()
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
48 placeholder="请输入审批意见" 48 placeholder="请输入审批意见"
49 v-model="item.shyj" 49 v-model="item.shyj"
50 ></el-input> 50 ></el-input>
51 <el-button class="opinion_btn" @click="commonOpinion(index)" v-if="ableOperation">常用意见</el-button>
51 </el-form-item> 52 </el-form-item>
52 </el-col> 53 </el-col>
53 </el-row> 54 </el-row>
...@@ -74,7 +75,7 @@ ...@@ -74,7 +75,7 @@
74 </div> 75 </div>
75 </el-form> 76 </el-form>
76 </div> 77 </div>
77 <div class="submit_button" v-if="!$route.query.viewtype"> 78 <div class="submit_button" v-if="ableOperation">
78 <el-button type="primary" @click="onSubmit('ruleFormRef')" 79 <el-button type="primary" @click="onSubmit('ruleFormRef')"
79 >保存</el-button 80 >保存</el-button
80 > 81 >
...@@ -93,6 +94,7 @@ export default { ...@@ -93,6 +94,7 @@ export default {
93 data() { 94 data() {
94 return { 95 return {
95 isNoData: false, 96 isNoData: false,
97 currentindex:0,
96 ableOperation: true, 98 ableOperation: true,
97 tableData: [{ jdmc: "初审" }], 99 tableData: [{ jdmc: "初审" }],
98 rules: { 100 rules: {
...@@ -103,19 +105,29 @@ export default { ...@@ -103,19 +105,29 @@ export default {
103 }; 105 };
104 }, 106 },
105 107
106 watch: {}, 108 watch: {
109 yjsqOptions: {
110 handler (val) {
111 this.add(val)
112 },
113 deep: true,
114 immediate: true
115 },
116 },
107 created() {}, 117 created() {},
108 mounted() { 118 mounted() {
119 this.propsParam.isEdit=this.$parent.isEdit
120 this.propsParam = this.$attrs;
121 if (this.$route.query.viewtype) {
122 this.ableOperation = false
123 }
109 this.getShList(); 124 this.getShList();
110 }, 125 },
111 methods: { 126 methods: {
112 deleClick(){ 127 deleClick(){
113 console.log("111 ");
114 if(this.tableData.length<=1){ 128 if(this.tableData.length<=1){
115 console.log("w222");
116 this.$message.error("最少填写一条初审意见"); 129 this.$message.error("最少填写一条初审意见");
117 }else if(this.tableData.length>=2){ 130 }else if(this.tableData.length>=2){
118 console.log("3333");
119 this.tableData=this.tableData.slice(0,-1) 131 this.tableData=this.tableData.slice(0,-1)
120 } 132 }
121 133
...@@ -175,23 +187,15 @@ export default { ...@@ -175,23 +187,15 @@ export default {
175 return false; 187 return false;
176 } 188 }
177 }, 189 },
178 // onSubmit() { 190 //打开常用意见列表弹窗
179 // this.$refs.tablelist[index].validate((valid) => { 191 commonOpinion (index) {
180 // if (valid) { 192 this.currentindex=index
181 // this.tableData.forEach((item, index) => { 193 this.$popupDialog("常用意见", "workflow/components/dialog/commonOpinion", {}, "70%", true)
182 // item["bsmBusiness"] = this.$parent.bsmRepair; 194 },
183 // }), 195 add(val){
184 // addidea(this.tableData).then((res) => { 196 this.$set(this.tableData[this.currentindex],'shyj',val)
185 // if (res.code === 200) { 197 }
186 // this.$message.success("保存成功"); 198
187 // this.refresh += 1;
188 // } else {
189 // this.$message.error(res.message);
190 // }
191 // });
192 // }
193 // });
194 // },
195 }, 199 },
196 }; 200 };
197 </script> 201 </script>
......
...@@ -34,7 +34,8 @@ export default { ...@@ -34,7 +34,8 @@ export default {
34 //批量按钮名称 34 //批量按钮名称
35 batchButtonName: '', 35 batchButtonName: '',
36 // 受理申请信息 36 // 受理申请信息
37 slsq: {} 37 slsq: {},
38 isshow:true
38 } 39 }
39 }, 40 },
40 mounted () { 41 mounted () {
...@@ -54,6 +55,14 @@ export default { ...@@ -54,6 +55,14 @@ export default {
54 if (res.code === 200) { 55 if (res.code === 200) {
55 this.leftButtonList = res.result.button; 56 this.leftButtonList = res.result.button;
56 this.rightButtonList = res.result.operation; 57 this.rightButtonList = res.result.operation;
58 console.log("this.rightButtonList[1].name",this.rightButtonList[1].name);
59 if(this.rightButtonList[1].name!="删除"){
60 this.$refs.Menu.getleftMenubl(1);
61 }else{
62 this.$refs.Menu.getleftMenubl();
63 }
64
65 console.log("this.rightButtonList ",this.rightButtonList);
57 // this.rightButtonList.splice(0,2) 66 // this.rightButtonList.splice(0,2)
58 } 67 }
59 }) 68 })
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-11 13:59:14 4 * @LastEditTime: 2023-07-11 13:59:14
5 */ 5 */
...@@ -37,8 +37,7 @@ export default { ...@@ -37,8 +37,7 @@ export default {
37 //根据tabname获取选中的表单 此操作为了获取后端返回的表单对象,使用里面的是否可操作的属性 37 //根据tabname获取选中的表单 此操作为了获取后端返回的表单对象,使用里面的是否可操作的属性
38 for (let item of this.tabList) { 38 for (let item of this.tabList) {
39 if (item.value === tabname) { 39 if (item.value === tabname) {
40 this.currentSelectTab = item 40 this.currentSelectTab = item;
41 console.log(item, 'item11111111111');
42 break; 41 break;
43 } 42 }
44 } 43 }
......