|
@@ -14,80 +14,80 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import detailTopInfo from '@/layout/custom/detailTopInfo.vue';
|
|
|
- import tUrgeHandleForm from '@/layout/tUrgeHandle/tUrgeHandleForm.vue';
|
|
|
- import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
- const { mapActions: tUrgeHandle } = createNamespacedHelpers('tUrgeHandle');
|
|
|
- const { mapActions: dictionary } = createNamespacedHelpers('dictionary');
|
|
|
+import detailTopInfo from '@/layout/custom/detailTopInfo.vue';
|
|
|
+import tUrgeHandleForm from '@/layout/tUrgeHandle/tUrgeHandleForm.vue';
|
|
|
+import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: tUrgeHandle } = createNamespacedHelpers('tUrgeHandle');
|
|
|
+const { mapActions: dictionary } = createNamespacedHelpers('dictionary');
|
|
|
|
|
|
- export default {
|
|
|
- name: 'detail',
|
|
|
- props: {},
|
|
|
- components: {
|
|
|
- detailTopInfo, //头部导航
|
|
|
- tUrgeHandleForm,
|
|
|
+export default {
|
|
|
+ name: 'detail',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ detailTopInfo, //头部导航
|
|
|
+ tUrgeHandleForm,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ display: 'block',
|
|
|
+ topTitle: '催办操作',
|
|
|
+ ruleForm: {},
|
|
|
+ loading: true,
|
|
|
+ subject_classification_list: [],
|
|
|
+ subject_headings_list: [],
|
|
|
+ company_description_list: [],
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ console.log(this.demand_id);
|
|
|
+ this.select();
|
|
|
+ /*this.selectDict(['subject_classification','subject_headings','company_description']);*/
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ demand_id() {
|
|
|
+ return this.$route.query.demand_id;
|
|
|
},
|
|
|
- data: () => ({
|
|
|
- display: 'block',
|
|
|
- topTitle: '催办操作',
|
|
|
- ruleForm: {},
|
|
|
- loading: true,
|
|
|
- subject_classification_list: [],
|
|
|
- subject_headings_list: [],
|
|
|
- company_description_list: [],
|
|
|
- }),
|
|
|
- created() {
|
|
|
- console.log(this.demand_id);
|
|
|
- this.select();
|
|
|
- /*this.selectDict(['subject_classification','subject_headings','company_description']);*/
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...tUrgeHandle(['create', 'delete', 'update', 'fetch', 'query']),
|
|
|
+ ...dictionary({ dictQuery: 'query' }),
|
|
|
+ // 返回
|
|
|
+ goBack() {
|
|
|
+ this.$router.go(-1);
|
|
|
},
|
|
|
- computed: {
|
|
|
- demand_id() {
|
|
|
- return this.$route.query.demand_id;
|
|
|
- },
|
|
|
- ...mapState(['user']),
|
|
|
+ async select() {
|
|
|
+ if (this.demand_id) {
|
|
|
+ const res = await this.query({ skip: 0, limit: 1, demand_id: this.demand_id });
|
|
|
+ this.$set(this, `ruleForm`, res.data[0]);
|
|
|
+ }
|
|
|
},
|
|
|
- methods: {
|
|
|
- ...tUrgeHandle(['create', 'delete', 'update', 'fetch', 'query']),
|
|
|
- ...dictionary({dictQuery:'query'}),
|
|
|
- // 返回
|
|
|
- goBack() {
|
|
|
- this.$router.go(-1);
|
|
|
- },
|
|
|
- async select() {
|
|
|
- if (this.demand_id) {
|
|
|
- const res = await this.query({ skip:0, limit:1, demand_id: this.demand_id});
|
|
|
- this.$set(this, `ruleForm`, res.data[0]);
|
|
|
- }
|
|
|
- },
|
|
|
- filterDict(dict){
|
|
|
- return dict.filter((val) => {
|
|
|
- return val.name !== '不限';
|
|
|
- });
|
|
|
- },
|
|
|
- async selectDict(arr) {
|
|
|
- for (let value of arr) {
|
|
|
- let res = await this.dictQuery({skip:0,limit:100,type:value});
|
|
|
- this.$set(this, `${value}_list`, this.filterDict(res.data));
|
|
|
- }
|
|
|
- },
|
|
|
- // 提交
|
|
|
- async submitForm({ data }) {
|
|
|
- console.log(this.user);
|
|
|
- data.type = '1';
|
|
|
- data.government_id = this.user.uid;
|
|
|
- data.government_name = this.user.name;
|
|
|
- data.company_type = '2';
|
|
|
- //console.log(data);
|
|
|
- let res = await this.create(data);
|
|
|
- this.$checkRes(res, '催办成功', '催办失败');
|
|
|
- this.resetForm();
|
|
|
+ filterDict(dict) {
|
|
|
+ return dict.filter(val => {
|
|
|
+ return val.name !== '不限';
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async selectDict(arr) {
|
|
|
+ for (let value of arr) {
|
|
|
+ let res = await this.dictQuery({ skip: 0, limit: 100, type: value });
|
|
|
+ this.$set(this, `${value}_list`, this.filterDict(res.data));
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 提交
|
|
|
+ async submitForm({ data }) {
|
|
|
+ console.log(this.user);
|
|
|
+ data.type = '1';
|
|
|
+ data.government_id = this.user.uid;
|
|
|
+ data.government_name = this.user.name;
|
|
|
+ data.company_type = '2';
|
|
|
+ //console.log(data);
|
|
|
+ let res = await this.create(data);
|
|
|
+ this.$checkRes(res, '催办成功', '催办失败');
|
|
|
+ this.resetForm();
|
|
|
|
|
|
- /*if(!data.image){
|
|
|
+ /*if(!data.image){
|
|
|
this.$message.error('请上传图片');
|
|
|
return ;
|
|
|
}*/
|
|
|
- /* let res;
|
|
|
+ /* let res;
|
|
|
if (this.id) {
|
|
|
if(data.current_state !== '0'){
|
|
|
this.$message.error('只有"未审核"的政策允许修改');
|
|
@@ -111,23 +111,23 @@
|
|
|
}
|
|
|
}
|
|
|
if (this.$checkRes(res)) this.resetForm();*/
|
|
|
- },
|
|
|
- // 取消
|
|
|
- resetForm() {
|
|
|
- this.$router.push({ path: '/tUrgeHandle/index' });
|
|
|
- },
|
|
|
},
|
|
|
- };
|
|
|
+ // 取消
|
|
|
+ resetForm() {
|
|
|
+ this.$router.push({ path: '/tUrgeHandle/index' });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
- .top {
|
|
|
- height: 50px;
|
|
|
- margin: 0 0 10px 0;
|
|
|
- }
|
|
|
- .main {
|
|
|
- min-height: 765px;
|
|
|
- background: #ffffff;
|
|
|
- padding: 20px;
|
|
|
- }
|
|
|
+.top {
|
|
|
+ height: 50px;
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+}
|
|
|
+.main {
|
|
|
+ min-height: 765px;
|
|
|
+ background: #ffffff;
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
</style>
|